Don't reapply UI visibility settings on subsequent config loads

This commit is contained in:
James Lyne 2021-05-19 15:44:26 +01:00
parent ff7250f081
commit 6812f1d78b

View File

@ -94,7 +94,8 @@ export const actions: ActionTree<State, State> & 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});
}