Fix docs list on sync and locale

This commit is contained in:
Vincent BRIDIER 2023-01-04 17:20:42 +01:00
parent 2863f4d6c0
commit a3b9f3e682
No known key found for this signature in database
GPG key ID: 8571BFA20420D512

View file

@ -4,6 +4,7 @@ import * as Sentry from "@sentry/react-native";
// Redux
import { Provider } from 'react-redux';
import { store } from './App/Store/ConfigureStore';
import { initDocuments } from './App/Store/Actions/documents';
// Deps
import 'react-native-gesture-handler';
import { NavigationContainer } from '@react-navigation/native';
@ -88,6 +89,7 @@ class App extends React.Component {
onPress={() => {
this.state.drawerRef.current.closeDrawer();
store.dispatch({ type: 'EDIT_LOCALE' });
store.dispatch(initDocuments(store.getState().locale.locale, store.getState().directories.global))
}}
style={styles.drawer.btn}>
<Image source={this.renderFlag()} style={{ width: 25, height: 25 }} />