Merge pull request #2916 from ssievert42/fastload

fastload: fix caching
pull/2926/head
Gordon Williams 2023-07-31 08:58:59 +01:00 committed by GitHub
commit 7ba94c100d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 4 deletions

View File

@ -3,3 +3,4 @@
0.03: Allow hiding the fastloading info screen
0.04: (WIP) Allow use of app history when going back (`load()` or `Bangle.load()` calls without specified app).
0.05: Check for changes in setting.js and force real reload if needed
0.06: Fix caching whether an app is fastloadable

View File

@ -30,12 +30,13 @@ let appFastloadPossible = function(n){
// no widgets, no problem
if (!global.WIDGETS) return true;
let app = s.read(n);
if (cache[n] && s.hash(app) == cache[n].hash)
let hash = s.hash(n);
if (cache[n] && hash == cache[n].hash)
return cache[n].fast;
let app = s.read(n);
cache[n] = {};
cache[n].fast = app.includes("Bangle.loadWidgets");
cache[n].hash = s.hash(app);
cache[n].hash = hash;
s.writeJSON("fastload.cache", cache);
return cache[n].fast;
};

View File

@ -1,7 +1,7 @@
{ "id": "fastload",
"name": "Fastload Utils",
"shortName" : "Fastload Utils",
"version": "0.05",
"version": "0.06",
"icon": "icon.png",
"description": "Enable experimental fastloading for more apps",
"type":"bootloader",