Clear on logout

This commit is contained in:
Manav Rathi
2024-06-27 16:36:30 +05:30
parent 3555adae09
commit 554a90eec5

View File

@@ -5,6 +5,7 @@ import InMemoryStore from "@ente/shared/storage/InMemoryStore";
import localForage from "@ente/shared/storage/localForage";
import { clearData } from "@ente/shared/storage/localStorage";
import { clearKeys } from "@ente/shared/storage/sessionStorage";
import { clear as clearKV } from "idb-keyval";
import { logout as remoteLogout } from "../api/user";
/**
@@ -56,4 +57,9 @@ export const accountLogout = async () => {
} catch (e) {
ignoreError("http", e);
}
try {
await clearKV();
} catch (e) {
ignoreError("kv", e);
}
};