diff --git a/apps/widbt_notify/ChangeLog b/apps/widbt_notify/ChangeLog index b5a50210e..3708089c1 100644 --- a/apps/widbt_notify/ChangeLog +++ b/apps/widbt_notify/ChangeLog @@ -8,3 +8,4 @@ 0.09: Vibrate on connection loss 0.10: Bug fix 0.11: Avoid too many notifications. Change disconnected colour to red. +0.12: Prevent repeated execution of `draw()` from the current app. diff --git a/apps/widbt_notify/metadata.json b/apps/widbt_notify/metadata.json index 0b795c2c8..0a144ade1 100644 --- a/apps/widbt_notify/metadata.json +++ b/apps/widbt_notify/metadata.json @@ -1,7 +1,7 @@ { "id": "widbt_notify", "name": "Bluetooth Widget with Notification", - "version": "0.11", + "version": "0.12", "description": "Show the current Bluetooth connection status in the top right of the clock and vibrate when disconnected.", "icon": "widget.png", "type": "widget", diff --git a/apps/widbt_notify/widget.js b/apps/widbt_notify/widget.js index 47765f3d0..fd088c670 100644 --- a/apps/widbt_notify/widget.js +++ b/apps/widbt_notify/widget.js @@ -28,7 +28,7 @@ WIDGETS.bluetooth_notify = { disconnect: function() { if(WIDGETS.bluetooth_notify.warningEnabled == 1){ E.showMessage(/*LANG*/'Connection\nlost.', 'Bluetooth'); - setInterval(()=>{WIDGETS.bluetooth_notify.redrawCurrentApp();}, 3000); // clear message - this will reload the widget, resetting 'warningEnabled'. + setTimeout(()=>{WIDGETS.bluetooth_notify.redrawCurrentApp();}, 3000); // clear message - this will reload the widget, resetting 'warningEnabled'. WIDGETS.bluetooth_notify.warningEnabled = 0; setTimeout('WIDGETS.bluetooth_notify.warningEnabled = 1;', 30000); // don't buzz for the next 30 seconds.