fix(desktop): preserve account refresh across identity mismatch

Signed-off-by: Codex <noreply@openai.com>
This commit is contained in:
Codex
2026-09-30 22:11:40 +00:00
parent e2d23ca8cf
commit c8bf27332e

View File

@@ -27,7 +27,8 @@ type RefreshContext = {
export async function refreshAcceptedCommunityDeletions(
context: RefreshContext,
): Promise<void> {
if (!context.isCurrent() || context.identityMismatch) return;
if (!context.isCurrent()) return;
const skipReplay = context.identityMismatch;
let auth = await invoke<BuilderlabAuth | null>("get_builderlab_auth");
if (!context.isCurrent()) return;
context.setAuth(auth);
@@ -36,7 +37,7 @@ export async function refreshAcceptedCommunityDeletions(
return;
}
const listed = await context.loadAccount();
if (!context.isCurrent()) return;
if (!context.isCurrent() || skipReplay) return;
if (auth.canDeleteBuzzCommunities !== true) return;
let restored = false;