From 6812f1d78b26b431c9d335886cd98779ffcf843d Mon Sep 17 00:00:00 2001 From: James Lyne Date: Wed, 19 May 2021 15:44:26 +0100 Subject: [PATCH] Don't reapply UI visibility settings on subsequent config loads --- src/store/actions.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/store/actions.ts b/src/store/actions.ts index 6f10444..04f0604 100644 --- a/src/store/actions.ts +++ b/src/store/actions.ts @@ -94,7 +94,8 @@ export const actions: ActionTree & Actions = { return config; } - if(state.configuration.expandUI && !state.ui.smallScreen) { + //Make UI visible if configured, there's enough space to do so, and this is the first config load + if(!state.ui.visibleElements.size && state.configuration.expandUI && !state.ui.smallScreen) { commit(MutationTypes.SET_UI_ELEMENT_VISIBILITY, {element: 'players', state: true}); commit(MutationTypes.SET_UI_ELEMENT_VISIBILITY, {element: 'maps', state: true}); }