Update widget.js

Reload the clock after the "connection lost" message was shown.
master
KungPhoo 2022-03-29 07:15:05 +02:00
parent 284da20f01
commit deb18b0ef5
1 changed files with 4 additions and 1 deletions

View File

@ -18,7 +18,10 @@ WIDGETS.bluetooth = {
disconnect: function() {
if(WIDGETS.bluetooth.warningEnabled == 1){
Bangle.buzz(700, 1); // buzz on connection loss
E.showMessage("Connection\nlost.","Bluetooth");
E.showMessage(/*LANG*/"Connection\nlost.","Bluetooth");
setInterval(()=>{load();}, 3000); // clear message
WIDGETS.bluetooth.warningEnabled = 0;
setTimeout('WIDGETS.bluetooth.warningEnabled = 1;', 30000); // re-notify only after 30 seconds.
}