launch: Fix showClocks setting not taking effect

...by now clearing cache when changing those settings.
master
thyttan 2025-03-30 11:21:06 +02:00
parent c28b6d3f9e
commit 5dd73bbea8
2 changed files with 9 additions and 1 deletions

View File

@ -24,3 +24,5 @@
0.22: Add less padding between launcher items, use new font if available in 2v26+ 0.22: Add less padding between launcher items, use new font if available in 2v26+
0.23: Draw a placeholder screen right at the start to speed up apparent boot time 0.23: Draw a placeholder screen right at the start to speed up apparent boot time
0.24: Fix fullscreen when fastloading the launcher. (TODO:fix back btn flicker) 0.24: Fix fullscreen when fastloading the launcher. (TODO:fix back btn flicker)
Fix showClocks setting not taking effect by now clearing cache when
changing those settings.

View File

@ -10,6 +10,9 @@
settings[key] = value; settings[key] = value;
require("Storage").write("launch.json",settings); require("Storage").write("launch.json",settings);
} }
function clearCache() {
require("Storage").erase("launch.cache.json")
}
const appMenu = { const appMenu = {
"": { "title": /*LANG*/"Launcher" }, "": { "title": /*LANG*/"Launcher" },
/*LANG*/"< Back": back, /*LANG*/"< Back": back,
@ -26,7 +29,10 @@
}, },
/*LANG*/"Show Clocks": { /*LANG*/"Show Clocks": {
value: settings.showClocks == true, value: settings.showClocks == true,
onchange: (m) => { save("showClocks", m) } onchange: (m) => {
save("showClocks", m);
clearCache();
}
}, },
/*LANG*/"Fullscreen": { /*LANG*/"Fullscreen": {
value: settings.fullscreen == true, value: settings.fullscreen == true,