This repository has been archived on 2026-11-17. You can view files and clone it, but cannot push or open issues or pull requests.
caelum0x bfc29616b7 feat: round-7 external harvest (18 features, all products green)
- gitgram-web (4): external link-preview/unfurl cards, rich inline embed players
  (YouTube/Twitch/Spotify/Vimeo)
- gitgram-backend (1): natural-language feed filtering (preferredLangOnly) + Post.contentLanguage
- gitgram-mobile (4): notification grouping/aggregation, shared timeAgo util
- aitm-api (7): GitNexus graph-RAG query + context retrieval endpoints (flagship surface)
- aitm-mcp (2): beads_claim atomic claim-for-work tool + brief-deps projection

Note: gitgram-backend adds Post.contentLanguage — run prisma migrate at deploy.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 19:17:27 +03:00

113 lines
2.9 KiB
TypeScript

import { Tabs } from 'expo-router';
import { Colors } from '../../constants/Colors';
import Icon from 'react-native-vector-icons/MaterialIcons';
import { emitSoftReset } from '../../utils/events';
import MinimalShellTabBar from '../../components/navigation/MinimalShellTabBar';
/**
* Fires a soft reset (scroll-to-top + refresh) when the user taps the tab that
* is already focused. React Navigation still navigates on a normal tab switch,
* so we gate on `navigation.isFocused()` to only react to a re-press.
*/
const softResetListeners = ({
navigation,
}: {
navigation: { isFocused: () => boolean };
}) => ({
tabPress: () => {
if (navigation.isFocused()) {
emitSoftReset();
}
},
});
export default function TabsLayout() {
return (
<Tabs
tabBar={(props) => <MinimalShellTabBar {...props} />}
screenOptions={{
headerShown: false,
tabBarActiveTintColor: Colors.primary,
tabBarInactiveTintColor: Colors.textSecondary,
tabBarStyle: {
backgroundColor: Colors.background,
borderTopColor: Colors.border,
borderTopWidth: 1,
height: 80,
paddingBottom: 8,
paddingTop: 8,
},
tabBarLabelStyle: {
fontSize: 12,
fontWeight: '500',
},
}}
>
<Tabs.Screen
name="home"
listeners={softResetListeners}
options={{
title: 'Home',
tabBarIcon: ({ color, size }) => (
<Icon name="home" size={size || 24} color={color} />
),
}}
/>
<Tabs.Screen
name="create-post"
options={{
href: null, // Hide from tab bar
}}
/>
<Tabs.Screen
name="reels"
options={{
title: 'Reels',
tabBarIcon: ({ color, size }) => (
<Icon name="play-circle-outline" size={size || 24} color={color} />
),
}}
/>
<Tabs.Screen
name="explore"
listeners={softResetListeners}
options={{
title: 'Explore',
tabBarIcon: ({ color, size }) => (
<Icon name="explore" size={size || 24} color={color} />
),
}}
/>
<Tabs.Screen
name="messages"
options={{
title: 'Messages',
tabBarIcon: ({ color, size }) => (
<Icon name="message" size={size || 24} color={color} />
),
}}
/>
<Tabs.Screen
name="notifications"
listeners={softResetListeners}
options={{
title: 'Notifications',
tabBarIcon: ({ color, size }) => (
<Icon name="notifications" size={size || 24} color={color} />
),
}}
/>
<Tabs.Screen
name="profile"
options={{
title: 'Profile',
tabBarIcon: ({ color, size }) => (
<Icon name="account-circle" size={size || 24} color={color} />
),
}}
/>
</Tabs>
);
}