diff options
author | Mohammad Reza Mahmoudi <rezamahmudy1@gmail.com> | 2023-05-17 18:03:05 +0330 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-17 09:33:05 -0500 |
commit | 6dde5ede34cea0abcf4529c2c7d90d355dfa97a3 (patch) | |
tree | 27159a0855db00b3b75c1aa43ca2d2e929fa7862 /src/view/shell | |
parent | b132ff7a7615eb6c8da0b60b226ff7e317c4033e (diff) | |
download | voidsky-6dde5ede34cea0abcf4529c2c7d90d355dfa97a3.tar.zst |
fix theme opposite labels (#700)
Diffstat (limited to 'src/view/shell')
-rw-r--r-- | src/view/shell/desktop/RightNav.tsx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/view/shell/desktop/RightNav.tsx b/src/view/shell/desktop/RightNav.tsx index d6663ce3d..fcdea35e8 100644 --- a/src/view/shell/desktop/RightNav.tsx +++ b/src/view/shell/desktop/RightNav.tsx @@ -11,13 +11,14 @@ import {s} from 'lib/styles' import {useStores} from 'state/index' import {pluralize} from 'lib/strings/helpers' import {useColorSchemeStyle} from 'lib/hooks/useColorSchemeStyle' -import {MoonIcon} from 'lib/icons' +import {MoonIcon, SunIcon} from 'lib/icons' import {formatCount} from 'view/com/util/numeric/format' export const DesktopRightNav = observer(function DesktopRightNav() { const store = useStores() const pal = usePalette('default') const mode = useColorSchemeStyle('Light', 'Dark') + const otherMode = mode === 'Dark' ? 'Light' : 'Dark'; const onDarkmodePress = React.useCallback(() => { store.shell.setDarkMode(!store.shell.darkMode) @@ -71,10 +72,15 @@ export const DesktopRightNav = observer(function DesktopRightNav() { : 'Sets display to dark mode' }> <View style={[pal.viewLight, styles.darkModeToggleIcon]}> - <MoonIcon size={18} style={pal.textLight} /> + { + mode === 'Dark' ? + <SunIcon size={18} style={pal.textLight} /> + : + <MoonIcon size={18} style={pal.textLight} /> + } </View> <Text type="sm" style={pal.textLight}> - {mode} mode + {otherMode} mode </Text> </TouchableOpacity> </View> |