From 9b79e5a29832c97f1bef7128b4296527e3f13a3d Mon Sep 17 00:00:00 2001 From: Nemo Date: Tue, 24 Mar 2026 12:07:08 +0800 Subject: [PATCH] fix: tab press listeners reset stack to index - fixes stale detail screen from cross-tab navigation --- app/(app)/_layout.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/(app)/_layout.tsx b/app/(app)/_layout.tsx index fb10855..7b78568 100644 --- a/app/(app)/_layout.tsx +++ b/app/(app)/_layout.tsx @@ -29,7 +29,10 @@ export default function AppLayout() { /> , unmountOnBlur: true }} + options={{ title: 'Clients', tabBarIcon: ({ color }) => }} + listeners={({ navigation }: any) => ({ + tabPress: () => { navigation.navigate('clients', { screen: 'index' }); }, + })} /> , unmountOnBlur: true }} + options={{ title: 'Tickets', tabBarIcon: ({ color }) => }} + listeners={({ navigation }: any) => ({ + tabPress: () => { navigation.navigate('tasks', { screen: 'index' }); }, + })} />