diff --git a/apps/mobile/src/modules/entry-list/entry-list.tsx b/apps/mobile/src/modules/entry-list/entry-list.tsx index fb073388a..1b7c0a975 100644 --- a/apps/mobile/src/modules/entry-list/entry-list.tsx +++ b/apps/mobile/src/modules/entry-list/entry-list.tsx @@ -4,11 +4,11 @@ import type { ListRenderItemInfo } from "@shopify/flash-list" import { FlashList } from "@shopify/flash-list" import { Image } from "expo-image" import { router } from "expo-router" -import { useColorScheme } from "nativewind" import { useCallback, useContext, useMemo } from "react" import type { NativeScrollEvent, NativeSyntheticEvent } from "react-native" import { RefreshControl, StyleSheet, Text, useAnimatedValue, View } from "react-native" import { useSafeAreaInsets } from "react-native-safe-area-context" +import { useColor } from "react-native-uikit-colors" import { NavigationBlurEffectHeader, @@ -79,7 +79,6 @@ function EntryListContent({ entryIds }: { entryIds: string[] }) { : originalDefaultHeaderHeight const scrollY = useContext(NavigationContext)?.scrollY - const { colorScheme } = useColorScheme() const { fetchNextPage, isFetching, refetch, isRefetching } = useFetchEntriesControls() const onScroll = useCallback( @@ -102,13 +101,15 @@ function EntryListContent({ entryIds }: { entryIds: string[] }) { [isFetching, screenType], ) + const systemFill = useColor("secondaryLabel") + return ( { refetch() }} diff --git a/apps/mobile/src/modules/feed-drawer/view-selector.tsx b/apps/mobile/src/modules/feed-drawer/view-selector.tsx index 142a77ff5..41d01ba99 100644 --- a/apps/mobile/src/modules/feed-drawer/view-selector.tsx +++ b/apps/mobile/src/modules/feed-drawer/view-selector.tsx @@ -1,16 +1,17 @@ import { Image } from "expo-image" import { useEffect } from "react" import type { StyleProp, ViewStyle } from "react-native" -import { ScrollView, Text, TouchableOpacity, View } from "react-native" +import { ScrollView, StyleSheet, Text, View } from "react-native" import { Grayscale } from "react-native-color-matrix-image-filters" -import Animated, { useSharedValue, withSpring } from "react-native-reanimated" +import { useAnimatedStyle, useSharedValue, withSpring } from "react-native-reanimated" +import { ReAnimatedTouchableOpacity } from "@/src/components/common/AnimatedComponents" import { FallbackIcon } from "@/src/components/ui/icon/fallback-icon" import type { ViewDefinition } from "@/src/constants/views" import { views } from "@/src/constants/views" import { useList } from "@/src/store/list/hooks" import { useAllListSubscription } from "@/src/store/subscription/hooks" -import { useColor } from "@/src/theme/colors" +import { accentColor, useColor } from "@/src/theme/colors" import { selectTimeline, useSelectedFeed } from "../feed-drawer/atoms" @@ -27,6 +28,7 @@ export function ViewSelector() { {views.map((view) => ( ))} + {lists.length > 0 && } {lists.map((listId) => ( ))} @@ -35,8 +37,6 @@ export function ViewSelector() { ) } -const AnimatedTouchableOpacity = Animated.createAnimatedComponent(TouchableOpacity) - function ItemWrapper({ children, isActive, @@ -56,17 +56,17 @@ function ItemWrapper({ }, [isActive, width]) return ( - ({ backgroundColor: bgColor, - width, + width: width.value, ...style, - }} + }))} > {children} - + ) } @@ -95,7 +95,7 @@ function ViewItem({ view }: { view: ViewDefinition }) { function ListItem({ listId }: { listId: string }) { const list = useList(listId) const selectedFeed = useSelectedFeed() - const bgColor = useColor("orange") + if (!selectedFeed) return null const isActive = selectedFeed.type === "list" && selectedFeed.listId === listId @@ -105,7 +105,7 @@ function ListItem({ listId }: { listId: string }) { selectTimeline({ type: "list", listId })} - style={isActive ? { backgroundColor: bgColor } : undefined} + style={isActive ? { backgroundColor: accentColor } : undefined} > {list.image ? ( isActive ? ( @@ -116,14 +116,7 @@ function ListItem({ listId }: { listId: string }) { ) ) : ( - + )} {isActive && ( @@ -133,3 +126,9 @@ function ListItem({ listId }: { listId: string }) { ) } + +const styles = StyleSheet.create({ + fallbackIcon: { + borderRadius: 8, + }, +}) diff --git a/apps/mobile/src/screens/(stack)/(tabs)/_layout.tsx b/apps/mobile/src/screens/(stack)/(tabs)/_layout.tsx index c1eb69681..a1bd8100a 100644 --- a/apps/mobile/src/screens/(stack)/(tabs)/_layout.tsx +++ b/apps/mobile/src/screens/(stack)/(tabs)/_layout.tsx @@ -1,8 +1,14 @@ import { FeedViewType } from "@follow/constants" -import { PlatformPressable } from "@react-navigation/elements/src/PlatformPressable" import { router, Tabs } from "expo-router" import { useContext, useEffect, useMemo, useState } from "react" -import { Animated as RNAnimated, Easing, StyleSheet, useAnimatedValue, View } from "react-native" +import { + Animated as RNAnimated, + Easing, + Pressable, + StyleSheet, + useAnimatedValue, + View, +} from "react-native" import { Gesture, GestureDetector } from "react-native-gesture-handler" import Animated, { runOnJS, useAnimatedStyle, useSharedValue } from "react-native-reanimated" @@ -93,7 +99,7 @@ export default function TabLayout() { return ( - + ) @@ -109,6 +115,9 @@ export default function TabLayout() { const Icon = !focused ? SafariCuteIcon : SafariCuteFi return }, + tabBarButton(props) { + return + }, }} /> @@ -121,7 +130,7 @@ export default function TabLayout() { return ( - + )