From b5e66340045b3d6f6c32c3d912921917f69ef731 Mon Sep 17 00:00:00 2001 From: KungPhoo Date: Wed, 30 Mar 2022 10:42:00 +0200 Subject: [PATCH] bugfix settings.json Read settings from the wron file. --- apps/messages/lib.js | 2 +- apps/widbt_notify/widget.js | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/messages/lib.js b/apps/messages/lib.js index d7c95570b..c517fde73 100644 --- a/apps/messages/lib.js +++ b/apps/messages/lib.js @@ -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){ diff --git a/apps/widbt_notify/widget.js b/apps/widbt_notify/widget.js index f1e4d372f..d6bad5dc9 100644 --- a/apps/widbt_notify/widget.js +++ b/apps/widbt_notify/widget.js @@ -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(); }