1
0
Fork 0

handle if Fastload Utils is installed or not with a hack instead of with a settings entry

master
thyttan 2023-03-12 14:12:57 +01:00
parent 3c6e708009
commit 850c791ba2
2 changed files with 1 additions and 6 deletions

View File

@ -42,7 +42,7 @@
});
g.clearRect(Bangle.appRect);
if (settings.fuInstalled) Bangle.loadWidgets(); // Compatibility with Fastload Utils.
let loadWidgets = "Bangle.loadWidgets();"; // Hack: Fool Fastload Utils that we call Bangle.loadWidgets(). This way we get the fastest possibe loading in whichever environment we find ourselvs.
// taken from Icon Launcher with some alterations
let timeoutToClock;

View File

@ -2,15 +2,10 @@
var storage = require("Storage");
var settings = Object.assign(storage.readJSON("quicklaunch.json", true) || {});
// Always check it Fastload Utils is installed. If it was uninstalled we want to stop loading widgets in quicklaunch.app.js.
if (!settings.fuInstalled) settings.fuInstalled = false;
if (storage.read("fastload.utils",0,1)) settings.fuInstalled = true;
// Add default settings if they haven't been configured before.
for (let c of ["lapp","rapp","uapp","dapp","tapp"]){ // l=left, r=right, u=up, d=down, t=tap.
if (!settings[c]) settings[c] = {"name":""};
}
storage.writeJSON("quicklaunch.json",settings);
// Convert settings object from before v0.12 to v0.12.
for (let c of ["leftapp","rightapp","upapp","downapp","tapapp"]){