diff --git a/ElectronClient/app.js b/ElectronClient/app.js index 49de72492..3e7d3aa41 100644 --- a/ElectronClient/app.js +++ b/ElectronClient/app.js @@ -32,6 +32,7 @@ const MigrationService = require('lib/services/MigrationService'); const CommandService = require('lib/services/CommandService').default; const TemplateUtils = require('lib/TemplateUtils'); const CssUtils = require('lib/CssUtils'); +const resourceEditWatcherReducer = require('lib/services/ResourceEditWatcher/reducer').default; const commands = [ require('./gui/Header/commands/focusSearch'), @@ -280,6 +281,10 @@ class Application extends BaseApplication { throw error; } + newState = resourceEditWatcherReducer(newState, action); + + CommandService.instance().scheduleMapStateToProps(newState); + return super.reducer(newState, action); } diff --git a/ReactNativeClient/lib/reducer.js b/ReactNativeClient/lib/reducer.js index 68eb0332d..1f8a0b1cc 100644 --- a/ReactNativeClient/lib/reducer.js +++ b/ReactNativeClient/lib/reducer.js @@ -2,8 +2,6 @@ const Note = require('lib/models/Note.js'); const Folder = require('lib/models/Folder.js'); const ArrayUtils = require('lib/ArrayUtils.js'); const { ALL_NOTES_FILTER_ID } = require('lib/reserved-ids'); -const CommandService = require('lib/services/CommandService').default; -const resourceEditWatcherReducer = require('lib/services/ResourceEditWatcher/reducer').default; const defaultState = { notes: [], @@ -1036,10 +1034,6 @@ const reducer = (state = defaultState, action) => { newState = handleHistory(newState, action); } - newState = resourceEditWatcherReducer(newState, action); - - CommandService.instance().scheduleMapStateToProps(newState); - return newState; };