From 56e0181c37c659c089356ba60fb3a82e9e22cdf9 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Wed, 19 Jul 2023 05:24:19 -0400 Subject: [PATCH] refactor: add getLoggedInDefer calls to kernelAuthStatus check --- src/main/background/kernel.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/background/kernel.ts b/src/main/background/kernel.ts index e66b25f..822b3c7 100644 --- a/src/main/background/kernel.ts +++ b/src/main/background/kernel.ts @@ -6,11 +6,13 @@ import { getAuthStatusDefer, getAuthStatusKnown, getKernelIframe, + getLoggedInDefer, getOpenPorts, getQueries, getQueriesNonce, getQuery, increaseQueriesNonce, + resetLoggedInDefer, setAuthStatus, setAuthStatusKnown, } from "../../vars.js"; @@ -49,6 +51,11 @@ export function handleKernelMessage(event: MessageEvent) { console.log("bootloader is now initialized"); if (!getAuthStatus().loginComplete) { console.log("user is not logged in: waiting until login is confirmed"); + } else { + getLoggedInDefer().resolve(); + } + if (getAuthStatus().logoutComplete) { + resetLoggedInDefer(); } }