about summary refs log tree commit diff
path: root/src/view/screens/Settings.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/view/screens/Settings.tsx')
-rw-r--r--src/view/screens/Settings.tsx13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/view/screens/Settings.tsx b/src/view/screens/Settings.tsx
index 428822339..798893855 100644
--- a/src/view/screens/Settings.tsx
+++ b/src/view/screens/Settings.tsx
@@ -38,6 +38,7 @@ import {NavigationProp} from 'lib/routes/types'
 import {isDesktopWeb} from 'platform/detection'
 import {pluralize} from 'lib/strings/helpers'
 import {formatCount} from 'view/com/util/numeric/format'
+import {isColorMode} from 'state/models/ui/shell'
 
 type Props = NativeStackScreenProps<CommonNavigatorParams, 'Settings'>
 export const SettingsScreen = withAuthRequired(
@@ -299,20 +300,26 @@ export const SettingsScreen = withAuthRequired(
                 value="system"
                 label="System"
                 left
-                onChange={(v: string) => store.shell.setColorMode(v)}
+                onChange={(v: string) =>
+                  store.shell.setColorMode(isColorMode(v) ? v : 'system')
+                }
               />
               <SelectableBtn
                 current={store.shell.colorMode}
                 value="light"
                 label="Light"
-                onChange={(v: string) => store.shell.setColorMode(v)}
+                onChange={(v: string) =>
+                  store.shell.setColorMode(isColorMode(v) ? v : 'system')
+                }
               />
               <SelectableBtn
                 current={store.shell.colorMode}
                 value="dark"
                 label="Dark"
                 right
-                onChange={(v: string) => store.shell.setColorMode(v)}
+                onChange={(v: string) =>
+                  store.shell.setColorMode(isColorMode(v) ? v : 'system')
+                }
               />
             </View>
           </View>