Move language preferences to new persistence + context (#1837)
This commit is contained in:
parent
e75b2d508b
commit
5843e212c0
15 changed files with 233 additions and 190 deletions
|
@ -17,6 +17,7 @@ import {useFocusEffect} from '@react-navigation/native'
|
|||
import {ViewHeader} from '../com/util/ViewHeader'
|
||||
import {CenteredView} from 'view/com/util/Views'
|
||||
import {useSetMinimalShellMode} from '#/state/shell'
|
||||
import {useLanguagePrefs} from '#/state/preferences'
|
||||
|
||||
type Props = NativeStackScreenProps<CommonNavigatorParams, 'AppPasswords'>
|
||||
export const AppPasswords = withAuthRequired(
|
||||
|
@ -161,6 +162,7 @@ function AppPassword({
|
|||
}) {
|
||||
const pal = usePalette('default')
|
||||
const store = useStores()
|
||||
const {contentLanguages} = useLanguagePrefs()
|
||||
|
||||
const onDelete = React.useCallback(async () => {
|
||||
store.shell.openModal({
|
||||
|
@ -174,8 +176,6 @@ function AppPassword({
|
|||
})
|
||||
}, [store, name])
|
||||
|
||||
const {contentLanguages} = store.preferences
|
||||
|
||||
const primaryLocale =
|
||||
contentLanguages.length > 0 ? contentLanguages[0] : 'en-US'
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue