Skip to content

Commit

Permalink
Fix player list not showing when expandUI is true
Browse files Browse the repository at this point in the history
  • Loading branch information
JLyne committed Jan 27, 2021
1 parent 7d6c6e6 commit 5eea037
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 5 additions & 0 deletions src/store/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ export const actions: ActionTree<State, State> & 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
Expand Down
5 changes: 0 additions & 5 deletions src/store/mutations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,6 @@ export const mutations: MutationTree<State> & 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
Expand Down

0 comments on commit 5eea037

Please sign in to comment.