feat: add booted defer back in

This commit is contained in:
Derrick Hammer 2023-07-25 11:47:34 -04:00
parent 9f246403a0
commit 4074f2475d
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 12 additions and 0 deletions

View File

@ -16,6 +16,7 @@ let authStatusDefer = defer();
let kernelFrame: HTMLIFrameElement; let kernelFrame: HTMLIFrameElement;
let blockForDnsSetup = defer(); let blockForDnsSetup = defer();
let loggedInDefer = defer(); let loggedInDefer = defer();
let booted = defer();
export const events = new Emittery(); export const events = new Emittery();
export function getAuthStatusKnown() { export function getAuthStatusKnown() {
@ -116,3 +117,14 @@ export function getLoggedInDefer() {
export function resetLoggedInDefer() { export function resetLoggedInDefer() {
loggedInDefer = defer(); loggedInDefer = defer();
} }
export function getBooted(): Promise<unknown> {
return booted.promise;
}
export function resetBooted(): void {
booted = defer();
}
export function weAreBooted(): void {
booted.resolve();
}