diff --git a/apps.json b/apps.json index ce63d3b00..644258709 100644 --- a/apps.json +++ b/apps.json @@ -956,7 +956,7 @@ "name": "Hand Wash Timer", "icon": "widget.png", "version":"0.01", - "description": "Any swip will start your personal Bangle.js hand wash timer for 35 sec. Start washing after the short buzz and stop after the long buzz.", + "description": "Swipe your wrist over the watch face to start your personal Bangle.js hand wash timer for 35 sec. Start washing after the short buzz and stop after the long buzz.", "tags": "widget,tool", "type":"widget", "storage": [ diff --git a/apps/widhwt/widget.js b/apps/widhwt/widget.js index 55ffec028..a8b15ac9b 100644 --- a/apps/widhwt/widget.js +++ b/apps/widhwt/widget.js @@ -2,6 +2,7 @@ (() => { var icon = require("heatshrink").decompress(atob("jEYwIKHgwCBhwCBh4CEggPCkACBmAXDBwVZ+EB+F4gEsjl8EgMP+EChk/gEMh+ehkA+YIBxwxBnF/4HggH/wEAj0AA==")); var color = 0x4A69; + var isActive = false; function draw() { g.reset().setColor(color).drawImage(icon, this.x + 1, 0); @@ -9,14 +10,18 @@ WIDGETS["widhwt"] = { area: "tr", width: 26, draw: draw }; - Bangle.on('swipe', function() { - color = 0x41f; - Bangle.buzz(); - Bangle.drawWidgets(); - setTimeout(() => { - color = 0x4A69; - Bangle.buzz(1E3, 1); + Bangle.on('twist', function() { + if (!isActive) { + isActive = true; + color = 0x41f; + Bangle.buzz(); Bangle.drawWidgets(); - }, 35E3); + setTimeout(() => { + color = 0x4A69; + Bangle.buzz(1E3, 1); + Bangle.drawWidgets(); + setTimeout(() => { isActive = false; }, 1E10); + }, 35E3); + } }); -})(); +})(); \ No newline at end of file