File tree Expand file tree Collapse file tree 3 files changed +6
-12
lines changed
Expand file tree Collapse file tree 3 files changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -11,3 +11,4 @@ when fastloading.
11110.10: Some refactoring to shorten the code.
12120.11: Further refactoring to shorten the code. Fixed search and play that was broken in v0.10.
13130.12: Fix some warnings from the linter.
14+ 0.13: Move ui-handlers inside setUI-call.
Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ let gfx = function() {
1414 widgetUtils . hide ( ) ;
1515 R = Bangle . appRect ;
1616 const MARIGIN = 8 ;
17- // g.drawString(str, x, y, solid)
1817 g . clearRect ( R ) ;
1918 g . reset ( ) ;
2019
@@ -100,23 +99,17 @@ let swipeHandler = function(LR, _) {
10099
101100// Navigation input on the main layout
102101let setUI = function ( ) {
103- // Bangle.setUI code from rigrig's smessages app for volume control: https://git.tubul.net/rigrig/BangleApps/src/branch/personal/apps/smessages/app.js
104102 Bangle . setUI (
105103 { mode : "updown" ,
106- remove : ( ) => {
107- Bangle . removeListener ( "touch" , touchHandler ) ;
108- Bangle . removeListener ( "swipe" , swipeHandler ) ;
109- clearWatch ( buttonHandler ) ;
110- widgetUtils . show ( ) ;
111- }
104+ touch : touchHandler ,
105+ swipe : swipeHandler ,
106+ btn : ( ) => load ( ) ,
107+ remove : ( ) => widgetUtils . show ( ) ,
112108 } ,
113109 ud => {
114110 if ( ud ) Bangle . musicControl ( ud > 0 ? "volumedown" : "volumeup" ) ;
115111 }
116112 ) ;
117- Bangle . on ( "touch" , touchHandler ) ;
118- Bangle . on ( "swipe" , swipeHandler ) ;
119- let buttonHandler = setWatch ( ( ) => { load ( ) ; } , BTN , { edge :'falling' } ) ;
120113} ;
121114
122115// Get back to the main layout
Original file line number Diff line number Diff line change 11{
22 "id" : " spotrem" ,
33 "name" : " Remote for Spotify" ,
4- "version" : " 0.12 " ,
4+ "version" : " 0.13 " ,
55 "description" : " Control spotify on your android device." ,
66 "readme" : " README.md" ,
77 "type" : " app" ,
You can’t perform that action at this time.
0 commit comments