settings persisted to redux store
This commit is contained in:
parent
6f6696b5bb
commit
3e275e7be5
5 changed files with 12 additions and 8 deletions
|
@ -16,6 +16,7 @@
|
|||
"react-navigation-redux-helpers": "^1.0.1",
|
||||
"react-redux": "^5.0.3",
|
||||
"redux": "^3.6.0",
|
||||
"redux-logger": "3.0.6",
|
||||
"redux-persist": "^4.8.0",
|
||||
"redux-persist-transform-compress": "^4.2.0",
|
||||
"redux-persist-transform-filter": "0.0.10",
|
||||
|
|
|
@ -87,12 +87,13 @@ const store = createStore(
|
|||
const compressor = createCompressor();
|
||||
const saveClaimsFilter = createFilter('claims', ['byId', 'claimsByUri']);
|
||||
const subscriptionsFilter = createFilter('subscriptions', ['subscriptions']);
|
||||
const settingsFilter = createFilter('settings', ['clientSettings']);
|
||||
|
||||
const persistOptions = {
|
||||
whitelist: ['claims', 'subscriptions'],
|
||||
whitelist: ['claims', 'subscriptions', 'settings'],
|
||||
// Order is important. Needs to be compressed last or other transforms can't
|
||||
// read the data
|
||||
transforms: [saveClaimsFilter, subscriptionsFilter, compressor],
|
||||
transforms: [saveClaimsFilter, subscriptionsFilter, settingsFilter, compressor],
|
||||
debounce: 10000,
|
||||
storage: AsyncStorage
|
||||
};
|
||||
|
|
|
@ -1512,9 +1512,10 @@ __d(function (global, require, module, exports, _dependencyMap) {
|
|||
var compressor = (0, _reduxPersistTransformCompress2.default)();
|
||||
var saveClaimsFilter = (0, _reduxPersistTransformFilter2.default)('claims', ['byId', 'claimsByUri']);
|
||||
var subscriptionsFilter = (0, _reduxPersistTransformFilter2.default)('subscriptions', ['subscriptions']);
|
||||
var settingsFilter = (0, _reduxPersistTransformFilter2.default)('settings', ['clientSettings']);
|
||||
var persistOptions = {
|
||||
whitelist: ['claims', 'subscriptions'],
|
||||
transforms: [saveClaimsFilter, subscriptionsFilter, compressor],
|
||||
whitelist: ['claims', 'subscriptions', 'settings'],
|
||||
transforms: [saveClaimsFilter, subscriptionsFilter, settingsFilter, compressor],
|
||||
debounce: 10000,
|
||||
storage: _reactNative.AsyncStorage
|
||||
};
|
||||
|
@ -1541,13 +1542,13 @@ __d(function (global, require, module, exports, _dependencyMap) {
|
|||
store: store,
|
||||
__source: {
|
||||
fileName: _jsxFileName,
|
||||
lineNumber: 109
|
||||
lineNumber: 110
|
||||
}
|
||||
},
|
||||
_react2.default.createElement(_AppNavigator2.default, {
|
||||
__source: {
|
||||
fileName: _jsxFileName,
|
||||
lineNumber: 110
|
||||
lineNumber: 111
|
||||
}
|
||||
})
|
||||
);
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
á…N†eº¸Îù‚ˆ™)5sCÊê
|
||||
őÚ¤
|
||||
’!’óĂŇW€mý6ű“
|
Loading…
Reference in a new issue