diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-11-08 08:52:01 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-08 08:52:01 -0800 |
commit | 3a211017d3d972fb442069e38d1b8ff1a2edbd57 (patch) | |
tree | a84d73fdf7aef6a6d7f46cba02eb91f24f3c5302 /src/view/screens/Settings.tsx | |
parent | 2acc88e78df1c1f4c21bf9a333f3432781a64135 (diff) | |
download | voidsky-3a211017d3d972fb442069e38d1b8ff1a2edbd57.tar.zst |
Move require alt-text to new persistence + context (#1839)
Diffstat (limited to 'src/view/screens/Settings.tsx')
-rw-r--r-- | src/view/screens/Settings.tsx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/view/screens/Settings.tsx b/src/view/screens/Settings.tsx index ca4ef2a40..09a99e6d2 100644 --- a/src/view/screens/Settings.tsx +++ b/src/view/screens/Settings.tsx @@ -50,6 +50,8 @@ import { useSetMinimalShellMode, useColorMode, useSetColorMode, + useRequireAltTextEnabled, + useSetRequireAltTextEnabled, } from '#/state/shell' // TEMPORARY (APP-700) @@ -66,6 +68,8 @@ export const SettingsScreen = withAuthRequired( const pal = usePalette('default') const store = useStores() const setMinimalShellMode = useSetMinimalShellMode() + const requireAltTextEnabled = useRequireAltTextEnabled() + const setRequireAltTextEnabled = useSetRequireAltTextEnabled() const navigation = useNavigation<NavigationProp>() const {isMobile} = useWebMediaQueries() const {screen, track} = useAnalytics() @@ -372,8 +376,8 @@ export const SettingsScreen = withAuthRequired( type="default-light" label="Require alt text before posting" labelType="lg" - isSelected={store.preferences.requireAltTextEnabled} - onPress={store.preferences.toggleRequireAltTextEnabled} + isSelected={requireAltTextEnabled} + onPress={() => setRequireAltTextEnabled(!requireAltTextEnabled)} /> </View> |