Add persistant

This commit is contained in:
kwaroran
2024-09-10 22:51:37 +09:00
parent 4e36d602fe
commit 09b3859006

View File

@@ -521,6 +521,15 @@ export async function loadData() {
try {
await loadRisuAccountData()
} catch (error) {}
}
try {
//@ts-ignore
const isInStandaloneMode = (window.matchMedia('(display-mode: standalone)').matches) || (window.navigator.standalone) || document.referrer.includes('android-app://');
if(isInStandaloneMode){
await navigator.storage.persist()
}
} catch (error) {
}
await checkNewFormat()
const db = get(DataBase);