From 4074f2475de270b475b25914dda69b626c4a048c Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Tue, 25 Jul 2023 11:47:34 -0400 Subject: [PATCH] feat: add booted defer back in --- src/vars.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/vars.ts b/src/vars.ts index f9d12f0..89e5038 100644 --- a/src/vars.ts +++ b/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 { + return booted.promise; +} + +export function resetBooted(): void { + booted = defer(); +} + +export function weAreBooted(): void { + booted.resolve(); +}