Skip to content

Commit 22bc199

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

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// This runs after a 'fresh' boot
22
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)
4-
and the clock in question doesn't have widgets, force a normal 'load' as this will then
5-
reset everything and remove the widgets. */
6-
if (global.__FILE__ && !s.clockHasWidgets) {load();throw "Clock has no widgets, can't fast load";}
4+
and the clock in question doesn't have widgets, and widgets are loaded, force a normal 'load'
5+
as this will then reset everything and remove the widgets. */
6+
if (global.__FILE__ && !s.clockHasWidgets && global.WIDGETS!==undefined) {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)