From 029a90b338d7290129b7923a8b469f354b3ed04f Mon Sep 17 00:00:00 2001 From: jjbrunton Date: Sun, 6 Sep 2026 12:41:23 +0100 Subject: [PATCH] fix(mobile): statically load paired unlock state --- apps/mobile/src/store/authStore.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/mobile/src/store/authStore.ts b/apps/mobile/src/store/authStore.ts index 3770059..c79d820 100644 --- a/apps/mobile/src/store/authStore.ts +++ b/apps/mobile/src/store/authStore.ts @@ -5,6 +5,7 @@ import { coupleApi } from "../lib/coupleApi"; import { profileSettingsApi } from "../lib/profileSettingsApi"; import { syncTimezone } from "../lib/reportedTimezone"; import { Events } from "../lib/analytics"; +import { clearPairedUnlockSeen } from "../lib/pairedUnlockSeen"; import type { Profile, Couple } from "@/types"; export interface AuthSessionSnapshot { @@ -206,7 +207,6 @@ export const useAuthStore = create((set, get) => ({ const unlockUserId = get().user?.id; const unlockCoupleId = get().couple?.id ?? get().user?.couple_id ?? null; if (unlockUserId) { - const { clearPairedUnlockSeen } = await import("../lib/pairedUnlockSeen"); await clearPairedUnlockSeen(unlockUserId, unlockCoupleId); } @@ -258,7 +258,7 @@ export const useAuthStore = create((set, get) => ({ // Clear other stores when user signs out if (user === null) { if (priorUserId) { - void import("../lib/pairedUnlockSeen").then(({ clearPairedUnlockSeen }) => clearPairedUnlockSeen(priorUserId, priorCoupleId)); + void clearPairedUnlockSeen(priorUserId, priorCoupleId); } const { useMatchStore, usePacksStore, useMessageStore, useSubscriptionStore, useNotificationPreferencesStore, useStreakStore, useResponsesStore, useQuizStore } = getOtherStores(); useMatchStore.getState().clearMatches();