1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-12 08:54:00 +02:00
joplin/ReactNativeClient/lib/components/shared/reduxSharedMiddleware.js
2018-05-09 12:39:17 +01:00

11 lines
343 B
JavaScript

const Setting = require('lib/models/Setting');
const reduxSharedMiddleware = function(store, next, action) {
const newState = store.getState();
if (action.type == 'FOLDER_SET_COLLAPSED' || action.type == 'FOLDER_TOGGLE') {
Setting.setValue('collapsedFolderIds', newState.collapsedFolderIds);
}
}
module.exports = reduxSharedMiddleware;