From fb92db2446cf1be875e162b3abdd164d1ed13690 Mon Sep 17 00:00:00 2001 From: x1unix Date: Mon, 11 Apr 2022 10:59:37 +0200 Subject: [PATCH] fix: store panel state properly in local storage. --- web/src/store/dispatch.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/web/src/store/dispatch.ts b/web/src/store/dispatch.ts index 7963cc0f..9eba45e1 100644 --- a/web/src/store/dispatch.ts +++ b/web/src/store/dispatch.ts @@ -193,8 +193,9 @@ export const dispatchToggleTheme: Dispatcher = }; export const dispatchPanelLayoutChange = (changes: Partial): Dispatcher => ( - (dispatch: DispatchFn, _: StateProvider) => { - config.panelLayout = changes; + (dispatch: DispatchFn, getState: StateProvider) => { + const { panel } = getState(); + config.panelLayout = { ...config.panelLayout, ...panel }; dispatch(newPanelStateChangeAction(changes)); } );