feat: add booted defer back in
This commit is contained in:
parent
9f246403a0
commit
4074f2475d
12
src/vars.ts
12
src/vars.ts
|
@ -16,6 +16,7 @@ let authStatusDefer = defer();
|
|||
let kernelFrame: HTMLIFrameElement;
|
||||
let blockForDnsSetup = defer();
|
||||
let loggedInDefer = defer();
|
||||
let booted = defer();
|
||||
export const events = new Emittery();
|
||||
|
||||
export function getAuthStatusKnown() {
|
||||
|
@ -116,3 +117,14 @@ export function getLoggedInDefer() {
|
|||
export function resetLoggedInDefer() {
|
||||
loggedInDefer = defer();
|
||||
}
|
||||
export function getBooted(): Promise<unknown> {
|
||||
return booted.promise;
|
||||
}
|
||||
|
||||
export function resetBooted(): void {
|
||||
booted = defer();
|
||||
}
|
||||
|
||||
export function weAreBooted(): void {
|
||||
booted.resolve();
|
||||
}
|
||||
|
|
Reference in New Issue