@@ -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-
363350Bangle . on ( 'lock' , on => {
364351 mode = 0 ;
365352 drawMain ( ) ; // draw immediately
366353 } ) ;
367- //Bangle.on('HRM',function() { setLight('COMPACTY','',isActive(),Light_COMPACTY);});
368354Bangle . on ( "message" , function ( ) { setLight ( 'COMPACTY' , '' , isActive ( ) , Light_COMPACTY ) ; } ) ;
369355Bangle . on ( 'charging' , drawMain ) ;
370356NRF . on ( 'connect' , function ( ) { setLight ( 'L3' , 'BT' , ! isBTConnected ( ) , Light_warn ) ; } ) ;
@@ -384,4 +370,18 @@ Bangle.on('swipe', function(directionLR) {
384370
385371g . clear ( ) ;
386372draw_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+
387387drawMain ( ) ;
0 commit comments