Skip to content

Commit b8666ba

Browse files
author
thyttan
committed
quicklaunch: easier to read if-else
1 parent ac7ed7d commit b8666ba

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

apps/quicklaunch/boot.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,15 @@
1313
let launchApp = function(trace) {
1414
if (!settings) settings = storage.readJSON("quicklaunch.json", true) || {};
1515

16-
if (settings[trace+"app"].src){
17-
if (settings[trace+"app"].name == "Show Launcher") Bangle.showLauncher();
18-
else if (!storage.read(settings[trace+"app"].src)) {
19-
E.showMessage(settings[trace+"app"].src+"\n"+/*LANG*/"was not found"+".", "Quick Launch");
20-
settings[trace+"app"] = {"name":"(none)"}; // reset entry.
21-
storage.write("quicklaunch.json", settings);
22-
setTimeout(load, 2000);
23-
} else load(settings[trace+"app"].src);
16+
if (settings[trace+"app"].src) {
17+
if (settings[trace+"app"].name == "Show Launcher") {
18+
Bangle.showLauncher();
19+
} else if (!storage.read(settings[trace+"app"].src)) {
20+
E.showMessage(settings[trace+"app"].src+"\n"+/*LANG*/"was not found"+".", "Quick Launch");
21+
settings[trace+"app"] = {"name":"(none)"}; // reset entry.
22+
storage.write("quicklaunch.json", settings);
23+
setTimeout(load, 2000);
24+
} else {load(settings[trace+"app"].src);}
2425
}
2526
}
2627

0 commit comments

Comments
 (0)