Fix save file got bigger everytime because of backup
parent
319052a4a8
commit
30fa15e367
|
@ -304,8 +304,8 @@
|
|||
calculatingPity = true;
|
||||
|
||||
// backup first
|
||||
const oldData = await getLocalSaveJson();
|
||||
await updateSave(`${prefix}backup`, oldData);
|
||||
// const oldData = await getLocalSaveJson();
|
||||
// await updateSave(`${prefix}backup`, oldData);
|
||||
|
||||
for (let [code, type] of Object.entries(types)) {
|
||||
await processWishes(code, type);
|
||||
|
|
|
@ -68,6 +68,13 @@ const convertTime = (data) => {
|
|||
};
|
||||
|
||||
const convertSave = async () => {
|
||||
const lfkeys = await localforage.keys();
|
||||
for (const key of lfkeys) {
|
||||
if (key.includes('backup')) {
|
||||
await localforage.removeItem(key);
|
||||
}
|
||||
}
|
||||
|
||||
const converted = localStorage.getItem(CONVERTED_KEY);
|
||||
if (converted !== null) return;
|
||||
|
||||
|
|
|
@ -50,8 +50,8 @@
|
|||
<script>
|
||||
window.AdSlots = window.AdSlots || { cmd: [], disableScripts: ['gpt'] };
|
||||
</script>
|
||||
<script async src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"></script>
|
||||
<script async src="https://kumo.network-n.com/dist/app.js" site="paimonmoe"></script>
|
||||
<script async src="https://securepubads.g.doubleclick.net/tag/js/gpt.js?n=1"></script>
|
||||
<script async src="https://kumo.network-n.com/dist/app.js?n=1" site="paimonmoe"></script>
|
||||
</head>
|
||||
<body class="font-body h-full bg-background-secondary">
|
||||
<!-- The application will be rendered inside this element,
|
||||
|
|
Loading…
Reference in New Issue