This commit is contained in:
Akinwale Ariwodola 2019-09-13 16:52:45 +01:00
parent 836ff2ae13
commit 9d3aabb00b

View file

@ -136,29 +136,35 @@ const store = createStore(
); );
window.store = store; window.store = store;
const persistor = persistStore(store, persistOptions, err => { /* const persistor = persistStore(store, persistOptions, err => {
if (err) { if (err) {
console.log('Unable to load saved SETTINGS'); console.log('Unable to load saved SETTINGS');
} }
}); });
window.persistor = persistor; window.persistor = persistor; */
/*
const persistFilter = { const persistFilter = {
'auth': ['authToken'], auth: ['authToken'],
'claims': ['byId', 'claimsByUri'], claims: ['byId', 'claimsByUri'],
'content': ['positions'], content: ['positions'],
'subscriptions': ['enabledChannelNotifications', 'subscriptions'], subscriptions: ['enabledChannelNotifications', 'subscriptions'],
'settings': ['clientSettings'], settings: ['clientSettings'],
'tags': ['followedTags'], tags: ['followedTags'],
'wallet': ['receiveAddress'] wallet: ['receiveAddress'],
}; };
store.subscribe(() => { store.subscribe(() => {
const state = (({ auth, claims, content, subscriptions, settings, tags, wallet }) => const state = (({ auth, claims, content, subscriptions, settings, tags, wallet }) => ({
({ auth, claims, content, subscriptions, settings, tags, wallet }))(store.getState()); auth,
claims,
content,
subscriptions,
settings,
tags,
wallet,
}))(store.getState());
NativeModules.StatePersistor.update(state, persistFilter); NativeModules.StatePersistor.update(state, persistFilter);
}); */ });
// TODO: Find i18n module that is compatible with react-native // TODO: Find i18n module that is compatible with react-native
global.__ = str => str; global.__ = str => str;