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

@ -40,11 +40,7 @@ const Screens: React.FC<Props> = ({ localCorrupt }) => {
const { t } = useTranslation('screens')
const dispatch = useDispatch()
const instanceActive = useSelector(getInstanceActive)
const { colors, mode, theme } = useTheme()
enum barStyle {
light = 'dark-content',
dark = 'light-content'
}
const { colors, theme } = useTheme()
const routeRef = useRef<{ name?: string; params?: {} }>()
@ -163,10 +159,7 @@ const Screens: React.FC<Props> = ({ localCorrupt }) => {
return (
<>
<StatusBar
barStyle={barStyle[mode]}
backgroundColor={colors.backgroundDefault}
/>
<StatusBar backgroundColor={colors.backgroundDefault} />
<NavigationContainer
ref={navigationRef}
theme={themes[theme]}