Clear player head cache/queue on server change
This commit is contained in:
parent
b82c9f39d2
commit
4535af754c
@ -29,7 +29,7 @@ import Sidebar from './components/Sidebar.vue';
|
|||||||
import ChatBox from './components/ChatBox.vue';
|
import ChatBox from './components/ChatBox.vue';
|
||||||
import {useStore} from "@/store";
|
import {useStore} from "@/store";
|
||||||
import {ActionTypes} from "@/store/action-types";
|
import {ActionTypes} from "@/store/action-types";
|
||||||
import {parseUrl} from '@/util';
|
import {clearHeadCache, parseUrl} from '@/util';
|
||||||
import {hideSplash, showSplash, showSplashError} from '@/util/splash';
|
import {hideSplash, showSplash, showSplashError} from '@/util/splash';
|
||||||
import {MutationTypes} from "@/store/mutation-types";
|
import {MutationTypes} from "@/store/mutation-types";
|
||||||
import {LiveAtlasServerDefinition, LiveAtlasUIElement} from "@/index";
|
import {LiveAtlasServerDefinition, LiveAtlasUIElement} from "@/index";
|
||||||
@ -170,6 +170,7 @@ export default defineComponent({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
clearHeadCache();
|
||||||
loadingAttempts.value = 0;
|
loadingAttempts.value = 0;
|
||||||
window.history.replaceState({}, '', newServer.id);
|
window.history.replaceState({}, '', newServer.id);
|
||||||
loadConfiguration();
|
loadConfiguration();
|
||||||
|
@ -126,6 +126,11 @@ const tickHeadQueue = () => {
|
|||||||
tickHeadQueue();
|
tickHeadQueue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const clearHeadCache = () => {
|
||||||
|
headCache.clear();
|
||||||
|
headQueue.splice(0);
|
||||||
|
}
|
||||||
|
|
||||||
export const parseUrl = (url: URL) => {
|
export const parseUrl = (url: URL) => {
|
||||||
const query = new URLSearchParams(url.search),
|
const query = new URLSearchParams(url.search),
|
||||||
hash = url.hash.replace('#', '');
|
hash = url.hash.replace('#', '');
|
||||||
|
Loading…
Reference in New Issue
Block a user