dtlaunch: Bangle 2: Use it's own chache file
parent
f25bf0989a
commit
307da9f610
|
|
@ -34,3 +34,4 @@ when moving pages. Add caching for faster startups.
|
||||||
0.27: Bangle 2: Add setting to remember and present the last open page between instances of dtlaunch.
|
0.27: Bangle 2: Add setting to remember and present the last open page between instances of dtlaunch.
|
||||||
0.28: Bangle 2: Fix showClocks and showLaunchers settings not taking effect by
|
0.28: Bangle 2: Fix showClocks and showLaunchers settings not taking effect by
|
||||||
clearing cache when changing those settings.
|
clearing cache when changing those settings.
|
||||||
|
Bangle 2: Use a separate cache file from the standard launcher.
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
let s = require("Storage");
|
let s = require("Storage");
|
||||||
// Borrowed caching from Icon Launcher, code by halemmerich.
|
// Borrowed caching from Icon Launcher, code by halemmerich.
|
||||||
let launchCache = s.readJSON("launch.cache.json", true)||{};
|
let launchCache = s.readJSON("dtlaunch.cache.json", true)||{};
|
||||||
let launchHash = require("Storage").hash(/\.info/);
|
let launchHash = require("Storage").hash(/\.info/);
|
||||||
if (launchCache.hash!=launchHash) {
|
if (launchCache.hash!=launchHash) {
|
||||||
launchCache = {
|
launchCache = {
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
if (a.name>b.name) return 1;
|
if (a.name>b.name) return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}) };
|
}) };
|
||||||
s.writeJSON("launch.cache.json", launchCache);
|
s.writeJSON("dtlaunch.cache.json", launchCache);
|
||||||
}
|
}
|
||||||
let apps = launchCache.apps;
|
let apps = launchCache.apps;
|
||||||
let page = 0;
|
let page = 0;
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
const timeOutChoices = [/*LANG*/"Off", "10s", "15s", "20s", "30s"];
|
const timeOutChoices = [/*LANG*/"Off", "10s", "15s", "20s", "30s"];
|
||||||
|
|
||||||
function clearCache() {
|
function clearCache() {
|
||||||
require("Storage").erase("launch.cache.json")
|
require("Storage").erase("dtlaunch.cache.json")
|
||||||
}
|
}
|
||||||
|
|
||||||
E.showMenu({
|
E.showMenu({
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue