Skip to content

Commit 0c64bda

Browse files
committed
try fix restore from launcher
1 parent 31e9ee5 commit 0c64bda

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

apps/dsky_clock/app.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -347,24 +347,10 @@ function queueDraw() {
347347
}, 60000 - (Date.now() % 60000));
348348
}
349349

350-
// Show launcher when middle button pressed
351-
Bangle.setUI({
352-
mode : "clock",
353-
remove : function() {
354-
if (drawTimeout) clearTimeout(drawTimeout);
355-
if (AltDrawTimer) clearTimeout(AltDrawTimer);
356-
drawTimeout = undefined;
357-
AltDrawTimer = undefined;
358-
require("widget_utils").show(); // re-show widgets
359-
}});
360-
Bangle.loadWidgets();
361-
require("widget_utils").swipeOn(); // hide widgets, make them visible with a swipe
362-
363350
Bangle.on('lock',on=>{
364351
mode = 0;
365352
drawMain(); // draw immediately
366353
});
367-
//Bangle.on('HRM',function() { setLight('COMPACTY','',isActive(),Light_COMPACTY);});
368354
Bangle.on("message",function() { setLight('COMPACTY','',isActive(),Light_COMPACTY);});
369355
Bangle.on('charging',drawMain);
370356
NRF.on('connect',function() { setLight('L3','BT',!isBTConnected(),Light_warn); });
@@ -384,4 +370,18 @@ Bangle.on('swipe', function(directionLR) {
384370

385371
g.clear();
386372
draw_bg();
373+
374+
// Show launcher when middle button pressed
375+
Bangle.setUI({
376+
mode : "clock",
377+
remove : function() {
378+
if (drawTimeout) clearTimeout(drawTimeout);
379+
if (AltDrawTimer) clearTimeout(AltDrawTimer);
380+
drawTimeout = undefined;
381+
AltDrawTimer = undefined;
382+
require("widget_utils").show(); // re-show widgets
383+
}});
384+
Bangle.loadWidgets();
385+
require("widget_utils").swipeOn(); // hide widgets, make them visible with a swipe
386+
387387
drawMain();

0 commit comments

Comments
 (0)