From 5eea0373ab4592d49e79c118a79271c5341495ee Mon Sep 17 00:00:00 2001 From: James Lyne Date: Wed, 27 Jan 2021 00:47:59 +0000 Subject: [PATCH] Fix player list not showing when expandUI is true --- src/store/actions.ts | 5 +++++ src/store/mutations.ts | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/store/actions.ts b/src/store/actions.ts index e7bf094..d5f8ff3 100644 --- a/src/store/actions.ts +++ b/src/store/actions.ts @@ -85,6 +85,11 @@ export const actions: ActionTree & Actions = { commit(MutationTypes.SET_COMPONENTS, config.components); commit(MutationTypes.SET_LOGGED_IN, config.loggedIn); + if(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}); + } + let worldName, mapName; // Use config default world if it exists diff --git a/src/store/mutations.ts b/src/store/mutations.ts index 40375c1..9c01951 100644 --- a/src/store/mutations.ts +++ b/src/store/mutations.ts @@ -81,11 +81,6 @@ export const mutations: MutationTree & Mutations = { // Sets configuration options from the initial config fetch [MutationTypes.SET_CONFIGURATION](state: State, config: DynmapServerConfig) { state.configuration = Object.assign(state.configuration, config); - - if(state.configuration.expandUI && !state.ui.smallScreen) { - state.ui.visibleElements.add('players'); - state.ui.visibleElements.add('maps'); - } }, //Set messsages from the initial config fetch