From 7ff0e53ac41887fa22f2591b5df2439ac9984397 Mon Sep 17 00:00:00 2001 From: Steven Wu Date: Thu, 28 Nov 2024 10:32:48 -0500 Subject: [PATCH] fix: open file blocks logout (#2281) - Fixes #1685 - Delays `AuthPluginPsk` remount so the broadcast message is received in time --- packages/app-utils/src/components/AppBootstrap.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/app-utils/src/components/AppBootstrap.tsx b/packages/app-utils/src/components/AppBootstrap.tsx index 20b8a4a2e5..b5644baa45 100644 --- a/packages/app-utils/src/components/AppBootstrap.tsx +++ b/packages/app-utils/src/components/AppBootstrap.tsx @@ -51,7 +51,9 @@ export function AppBootstrap({ const [logoutCount, setLogoutCount] = useState(0); const onLogin = useCallback(() => undefined, []); const onLogout = useCallback(() => { - setLogoutCount(value => value + 1); + requestAnimationFrame(() => { + setLogoutCount(value => value + 1); + }); }, []); useBroadcastLoginListener(onLogin, onLogout); return (