Archived
Add offline caching and refine Live Activity
This commit is contained in:
@@ -22,6 +22,7 @@ import { setRuntimeApiUrl, getApiUrl, DEFAULT_API_URL, invalidServerUrlMessage }
|
||||
import { clearAuthStorage, readStoredSessionUser } from "@/lib/auth-storage";
|
||||
import { normalizeInstanceUrl, saveStoredInstanceUrl } from "@/lib/instance-url";
|
||||
import { migrateStoredOfficialUrls } from "@/lib/official-url-migration";
|
||||
import { clearOfflineQueryCacheForAccount } from "@/lib/offline-cache";
|
||||
import { clearTimeClockPrefsForAccount } from "@/lib/time-clock-prefs";
|
||||
|
||||
export type RemoveAccountResult = {
|
||||
@@ -159,6 +160,7 @@ export function AccountsProvider({ children }: { children: ReactNode }) {
|
||||
const wasActive = activeAccountId === accountId;
|
||||
|
||||
await clearAuthStorage(authStoragePrefix(accountId));
|
||||
await clearOfflineQueryCacheForAccount(accountId);
|
||||
await clearTimeClockPrefsForAccount(accountId);
|
||||
|
||||
const nextAccounts = accounts.filter((account) => account.id !== accountId);
|
||||
|
||||
Reference in New Issue
Block a user