mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-25 06:26:16 -04:00
Build 29085898
This commit is contained in:
parent
ae2f43be0e
commit
de485e5598
7 changed files with 41 additions and 27 deletions
|
@ -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}`;
|
||||
|
|
|
@ -1 +1 @@
|
|||
"29085883"
|
||||
"29085898"
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue