1
0
mirror of https://github.com/tooot-app/app synced 2024-12-22 07:34:06 +01:00

Fix iOS language cannot be changed

This commit is contained in:
xmflsct 2022-12-05 13:40:36 +01:00
parent a901fdb9ff
commit 2516b9753b
2 changed files with 4 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{
"name": "tooot",
"version": "4.6.5",
"version": "4.6.6",
"description": "tooot for Mastodon",
"author": "xmflsct <me@xmflsct.com>",
"license": "GPL-3.0-or-later",

View File

@ -1,4 +1,5 @@
import { ActionSheetProvider } from '@expo/react-native-action-sheet'
import getLanguage from '@helpers/getLanguage'
import queryClient from '@helpers/queryClient'
import i18n from '@root/i18n/i18n'
import Screens from '@root/Screens'
@ -12,7 +13,7 @@ import timezone from '@root/startup/timezone'
import { persistor, store } from '@root/store'
import * as Sentry from '@sentry/react-native'
import AccessibilityManager from '@utils/accessibility/AccessibilityManager'
import { changeLanguage, getSettingsLanguage } from '@utils/slices/settingsSlice'
import { changeLanguage } from '@utils/slices/settingsSlice'
import ThemeManager from '@utils/styles/ThemeManager'
import * as Localization from 'expo-localization'
import * as SplashScreen from 'expo-splash-screen'
@ -85,7 +86,7 @@ const App: React.FC = () => {
if (bootstrapped) {
log('log', 'App', 'loading actual app :)')
log('log', 'App', `Locale: ${Localization.locale}`)
const language = getSettingsLanguage(store.getState())
const language = getLanguage()
if (!language) {
if (Platform.OS !== 'ios') {
store.dispatch(changeLanguage('en'))