1
0
Fork 0

bugfix settings.json

Read settings from the wron file.
master
KungPhoo 2022-03-30 10:42:00 +02:00
parent 85a0c4100d
commit b5e6634004
2 changed files with 6 additions and 3 deletions

View File

@ -58,7 +58,7 @@ exports.pushMessage = function(event) {
var loadMessages = Bangle.CLOCK || event.important;
// first, buzz
var quiet = (require('Storage').readJSON('setting.json',1)||{}).quiet;
var unlockWatch = (require('Storage').readJSON('setting.json',1)||{}).unlockWatch;
var unlockWatch = (require('Storage').readJSON('messages.setting.json',1)||{}).unlockWatch;
if (!quiet && loadMessages && global.WIDGETS && WIDGETS.messages){
WIDGETS.messages.buzz();
if(unlockWatch != false){

View File

@ -17,13 +17,16 @@ WIDGETS.bluetooth_notify = {
},
disconnect: function() {
if(WIDGETS.bluetooth_notify.warningEnabled == 1){
Bangle.buzz(700, 1); // buzz on connection loss
E.showMessage(/*LANG*/'Connection\nlost.', 'Bluetooth');
// setInterval(()=>{load();}, 3000); // clear message - this will reload the widget, resetting 'warningEnabled'.
WIDGETS.bluetooth_notify.warningEnabled = 0;
setTimeout('WIDGETS.bluetooth_notify.warningEnabled = 1;', 30000); // re-notify only after 30 seconds.
var quiet = (require('Storage').readJSON('setting.json',1)||{}).quiet;
if(!quiet){
Bangle.buzz(700, 1); // buzz on connection loss
}
}
WIDGETS.bluetooth_notify.draw();
}