fix: tab stack reset, GPS optional for install, status picker mutation fix

This commit is contained in:
Nemo
2026-03-24 16:09:21 +08:00
parent e0da23fa56
commit a5cac16924
2 changed files with 49 additions and 35 deletions

View File

@@ -29,9 +29,12 @@ export default function AppLayout() {
/>
<Tabs.Screen
name="clients"
options={{ title: 'Clients', tabBarIcon: ({ color }) => <Icon name="users" size={22} color={color} /> }}
options={{ title: 'Clients', tabBarIcon: ({ color }) => <Icon name="users" size={22} color={color} />, unmountOnBlur: true }}
listeners={({ navigation }: any) => ({
tabPress: () => { navigation.navigate('clients', { screen: 'index' }); },
tabPress: (e) => {
e.preventDefault();
navigation.reset({ index: 0, routes: [{ name: 'clients' }] });
},
})}
/>
<Tabs.Screen
@@ -40,9 +43,12 @@ export default function AppLayout() {
/>
<Tabs.Screen
name="tasks"
options={{ title: 'Tickets', tabBarIcon: ({ color }) => <Icon name="ticket" size={22} color={color} /> }}
options={{ title: 'Tickets', tabBarIcon: ({ color }) => <Icon name="ticket" size={22} color={color} />, unmountOnBlur: true }}
listeners={({ navigation }: any) => ({
tabPress: () => { navigation.navigate('tasks', { screen: 'index' }); },
tabPress: (e) => {
e.preventDefault();
navigation.reset({ index: 0, routes: [{ name: 'tasks' }] });
},
})}
/>
<Tabs.Screen