fix: sync post translation state and clear feed cache on language change
This commit is contained in:
@@ -11,6 +11,7 @@ import GlobalState from '../contexts/GlobalState.js';
|
||||
import API from "../API.js";
|
||||
import * as ImagePicker from 'expo-image-picker';
|
||||
import { useNavigation } from '@react-navigation/native';
|
||||
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||
|
||||
|
||||
|
||||
@@ -158,6 +159,11 @@ let ProfileSettings = () => {
|
||||
...currentProfile,
|
||||
};
|
||||
}
|
||||
await AsyncStorage.removeItem('feed');
|
||||
if (language && language !== i18n.locale) {
|
||||
i18n.locale = language;
|
||||
Moment.locale(language);
|
||||
}
|
||||
console.log(r);
|
||||
setUpdateKey((k) => k + 1);
|
||||
if (goBackAfter) {
|
||||
|
||||
Reference in New Issue
Block a user