From 47feac174a31ad1c2416820503a397e2904d7b22 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sun, 18 Dec 2022 11:16:30 +0100 Subject: [PATCH] Fixed #570 --- src/screens/Tabs/Shared/Account.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/screens/Tabs/Shared/Account.tsx b/src/screens/Tabs/Shared/Account.tsx index c2becf37..21c8c653 100644 --- a/src/screens/Tabs/Shared/Account.tsx +++ b/src/screens/Tabs/Shared/Account.tsx @@ -100,6 +100,7 @@ const TabSharedAccount: React.FC } }, [isFetchingTimeline, fetchedTimeline.current]) + const [segment, setSegment] = useState(0) const ListHeaderComponent = useMemo(() => { return ( <> @@ -114,8 +115,9 @@ const TabSharedAccount: React.FC { + setSegment(nativeEvent.selectedSegmentIndex) switch (nativeEvent.selectedSegmentIndex) { case 0: setQueryKey([ @@ -171,7 +173,7 @@ const TabSharedAccount: React.FC ) : null} ) - }, [data, fetchedTimeline.current, queryKey[1].page, mode]) + }, [segment, data, fetchedTimeline.current, queryKey[1].page, mode]) return ( <>