Reorder IPC callbacks for settings window

This commit is contained in:
Fedor Indutny 2021-09-07 12:42:17 -07:00 committed by GitHub
parent 5c7972893c
commit 4bed918cf8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 19 additions and 15 deletions

View file

@ -9,6 +9,7 @@ import { COLORS_CHANGED, COLOR_SELECTED } from '../state/ducks/conversations';
export const dispatchItemsMiddleware: Middleware = ({
getState,
}) => next => action => {
const result = next(action);
if (
action.type === 'items/PUT' ||
action.type === 'items/PUT_EXTERNAL' ||
@ -20,6 +21,5 @@ export const dispatchItemsMiddleware: Middleware = ({
) {
ipcRenderer.send('preferences-changed', getState().items);
}
return next(action);
return result;
};