Refactor header.ts

This commit is contained in:
redphx
2024-07-13 18:00:15 +07:00
parent 66d5d9edc6
commit 5bfcf3a044
5 changed files with 73 additions and 65 deletions

View File

@@ -1,7 +1,7 @@
import { BxEvent } from "@utils/bx-event";
import { LoadingScreen } from "@modules/loading-screen";
import { RemotePlay } from "@modules/remote-play";
import { checkHeader } from "@modules/ui/header";
import { HeaderSection } from "@/modules/ui/header";
export function patchHistoryMethod(type: 'pushState' | 'replaceState') {
const orig = window.history[type];
@@ -34,7 +34,7 @@ export function onHistoryChanged(e: PopStateEvent) {
RemotePlay.detachPopup();
LoadingScreen.reset();
window.setTimeout(checkHeader, 2000);
window.setTimeout(HeaderSection.watchHeader, 2000);
BxEvent.dispatch(window, BxEvent.STREAM_STOPPED);
}