Merge branch 'dev' of https://code.littlelan.cn/carrot_bbs/frontend into dev
Some checks failed
Frontend CI / ota-android (push) Successful in 2m33s
Frontend CI / ota-ios (push) Successful in 8m2s
Frontend CI / build-and-push-web (push) Failing after 15m26s
Frontend CI / build-android-apk (push) Successful in 1h45m49s

This commit is contained in:
lafay
2026-06-12 23:42:11 +08:00
27 changed files with 565 additions and 376 deletions

View File

@@ -50,6 +50,18 @@ export default function TabsLayout() {
[isHomeStackRoute, pathname, triggerHomeTabPress, router]
);
const handleAppsTabPress = useCallback(() => {
if (pathname.startsWith('/apps/')) {
router.replace('/apps');
}
}, [pathname, router]);
const handleProfileTabPress = useCallback(() => {
if (pathname.startsWith('/profile/')) {
router.replace('/profile');
}
}, [pathname, router]);
const tabBarStyle = useMemo(() => {
if (hideTabBar) {
return { display: 'none' as const, height: 0, overflow: 'hidden' as const };
@@ -125,6 +137,9 @@ export default function TabsLayout() {
/>
),
}}
listeners={{
tabPress: handleAppsTabPress,
}}
/>
<Tabs.Screen
name="messages"
@@ -152,6 +167,9 @@ export default function TabsLayout() {
/>
),
}}
listeners={{
tabPress: handleProfileTabPress,
}}
/>
</Tabs>
);