Skip to content

Commit 8589199

Browse files
author
thyttan
committed
boot: allow fast load to clock if WIDGETS is not defined.
1 parent 936c41c commit 8589199

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

apps/boot/ChangeLog

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,6 @@
7979
0.66: Ensure __FILE__ is set even after a fresh boot (fix #3857)
8080
0.67: When generating .clkinfocache, apply configured exclusions
8181
0.68: Allow setting screen brightness to 0
82-
Implement "Charge Vibration" option in Settings (was in widbat before)
82+
Implement "Charge Vibration" option in Settings (was in widbat before)
83+
Allow fast load to clock if WIDGETS are not defined.
84+

apps/boot/bootloader.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ var s = require("Storage").readJSON("setting.json",1)||{};
33
/* If were being called from JS code in order to load the clock quickly (eg from a launcher)
44
and the clock in question doesn't have widgets, force a normal 'load' as this will then
55
reset everything and remove the widgets. */
6-
if (global.__FILE__ && !s.clockHasWidgets) {load();throw "Clock has no widgets, can't fast load";}
6+
if (global.__FILE__ && (global.WIDGETS!==undefined && !s.clockHasWidgets)) {load();throw "Widgets defined and clock has no widgets, can't fast load";}
77
// Otherwise continue to try and load the clock
88
var _clkApp = require("Storage").read(s.clock);
99
if (!_clkApp) {
@@ -27,4 +27,4 @@ if (s.clock) __FILE__=s.clock;
2727
delete s;
2828
if (!_clkApp) _clkApp=`E.showMessage("No Clock Found");setWatch(()=>{Bangle.showLauncher();}, global.BTN2||BTN, {repeat:false,edge:"falling"});`;
2929
eval(_clkApp);
30-
delete _clkApp;
30+
delete _clkApp;

0 commit comments

Comments
 (0)