Build 29085898

This commit is contained in:
Renan LE CARO 2025-04-20 14:58:29 +02:00
parent ae2f43be0e
commit de485e5598
7 changed files with 41 additions and 27 deletions

View file

@ -1,5 +1,5 @@
// The version of the cache.
const VERSION = "29085883";
const VERSION = "29085898";
// The name of the cache
const CACHE_NAME = `breakout-71-${VERSION}`;

View file

@ -1 +1 @@
"29085883"
"29085898"

View file

@ -1,5 +1,7 @@
// Settings
import { toast } from "./toast";
let cachedSettings: { [key: string]: unknown } = {};
try {
@ -26,6 +28,7 @@ export function setSettingValue<T>(key: string, value: T) {
cachedSettings[key] = value;
}
let warnedUserAboutLSIssue = false;
export function commitSettingsChangesToLocalStorage() {
try {
for (let key of needsSaving) {
@ -33,6 +36,10 @@ export function commitSettingsChangesToLocalStorage() {
}
needsSaving.clear();
} catch (e) {
if (!warnedUserAboutLSIssue) {
warnedUserAboutLSIssue = true;
toast(`Storage issue : ${(e as Error)?.message}`);
}
console.warn(e);
}
}