Skip to content

Commit 98df68d

Browse files
author
thyttan
committed
quicklaunch: use fast loading when possible
1 parent f99995c commit 98df68d

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

apps/quicklaunch/ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@
1414
0.14: Extension: Don't go down a path if nothing waits at the end. Revisit the current intersection instead.
1515
0.15: Extension: Compatibility with "Fastload Utils" app history feature.
1616
0.16: Snappier. Fewer storage interactions.
17+
0.17: (WIP) Use Bangle.load to do faster loads when we can.

apps/quicklaunch/app.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
else if (!storage.read(settings[trace+"app"].src)) {
3232
E.showMessage(settings[trace+"app"].src+"\n"+/*LANG*/"was not found"+".", "Quick Launch");
3333
settings[trace+"app"] = {"name":"(none)"}; // reset entry.
34-
} else load(settings[trace+"app"].src);
34+
} else Bangle.load(settings[trace+"app"].src);
3535
}
3636
};
3737

@@ -60,6 +60,7 @@
6060
storage.writeJSON("quicklaunch.json", settings);
6161
E.removeListener("kill", saveAndClear);
6262
if (timeoutToClock) clearTimeout(timeoutToClock); // Compatibility with Fastload Utils.
63+
require("widget_utils").hide();
6364
}
6465

6566
Bangle.setUI({
@@ -79,7 +80,7 @@
7980
const updateTimeoutToClock = function(){
8081
let time = 1500; // milliseconds
8182
if (timeoutToClock) clearTimeout(timeoutToClock);
82-
timeoutToClock = setTimeout(load,time);
83+
timeoutToClock = setTimeout(Bangle.load,time);
8384
};
8485
updateTimeoutToClock();
8586

apps/quicklaunch/boot.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,11 @@
2020
E.showMessage(settings[trace+"app"].src+"\n"+/*LANG*/"was not found"+".", "Quick Launch");
2121
settings[trace+"app"] = {"name":"(none)"}; // reset entry.
2222
storage.write("quicklaunch.json", settings);
23-
setTimeout(load, 2000);
24-
} else {load(settings[trace+"app"].src);}
23+
setTimeout(Bangle.load, 2000);
24+
} else {
25+
require("widget_utils").hide();
26+
Bangle.load(settings[trace+"app"].src);
27+
}
2528
}
2629
};
2730

apps/quicklaunch/metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"id": "quicklaunch",
33
"name": "Quick Launch",
44
"icon": "app.png",
5-
"version": "0.16",
5+
"version": "0.17",
66
"description": "Tap or swipe left/right/up/down on your clock face to launch up to five apps of your choice. Configurations can be accessed through Settings->Apps.",
77
"type": "bootloader",
88
"tags": "tools,system",

0 commit comments

Comments
 (0)