1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Fix theme changing issue

This commit is contained in:
Zhiyuan Zheng
2022-02-17 00:09:19 +01:00
parent fb8bb54989
commit dd7b9cd6a2
6 changed files with 15 additions and 30 deletions

View File

@ -23,7 +23,7 @@ const Stack = createNativeStackNavigator<TabPublicStackParamList>()
const TabPublic = React.memo(
({ navigation }: ScreenTabsScreenProps<'Tab-Public'>) => {
const { t, i18n } = useTranslation('screenTabs')
const { mode } = useTheme()
const { mode, theme } = useTheme()
const [segment, setSegment] = useState(0)
const pages: {
@ -67,7 +67,7 @@ const TabPublic = React.memo(
/>
)
}),
[mode, segment, i18n.language]
[theme, segment, i18n.language]
)
const routes = pages.map(p => ({ key: p.key }))