Remove updateInterval from store

This commit is contained in:
James Lyne 2021-07-24 02:13:03 +01:00
parent 33b5b305e2
commit 44b3a7e276
3 changed files with 1 additions and 4 deletions

1
src/dynmap.d.ts vendored
View File

@ -50,7 +50,6 @@ interface DynmapServerConfig {
defaultZoom: number;
followMap?: string;
followZoom: number;
updateInterval: number;
showLayerControl: boolean;
title: string;
loginEnabled: boolean;

View File

@ -60,7 +60,6 @@ export default class DynmapMapProvider extends MapProvider {
defaultZoom: response.defaultzoom || 0,
followMap: response.followmap || undefined,
followZoom: response.followzoom || 0,
updateInterval: response.updaterate || 3000,
showLayerControl: response.showlayercontrol && response.showlayercontrol !== 'false', //Sent as a string for some reason
title: response.title.replace(titleColoursRegex, '') || 'Dynmap',
loginEnabled: response['login-enabled'] || false,
@ -672,7 +671,7 @@ export default class DynmapMapProvider extends MapProvider {
const store = useStore(),
config = DynmapMapProvider.buildServerConfig(response);
this.updateInterval = config.updateInterval;
this.updateInterval = response.updaterate || 3000;
store.commit(MutationTypes.SET_SERVER_CONFIGURATION, config);
store.commit(MutationTypes.SET_SERVER_MESSAGES, DynmapMapProvider.buildMessagesConfig(response));

View File

@ -95,7 +95,6 @@ export const state: State = {
defaultZoom: 0,
followMap: '',
followZoom: 0,
updateInterval: 3000,
showLayerControl: false,
title: '',
loginEnabled: false,