1
0
Fork 0

Merge branch 'espruino:master' into master

master
sir-indy 2022-04-19 15:08:08 +01:00 committed by GitHub
commit 7250f80d58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 3 deletions

View File

@ -44,3 +44,4 @@
0.29: Fix message list overwrites on Bangle.js 1 (fix #1642) 0.29: Fix message list overwrites on Bangle.js 1 (fix #1642)
0.30: Add new Icons (Youtube, Twitch, MS TODO, Teams, Snapchat, Signal, Post & DHL, Nina, Lieferando, Kalender, Discord, Corona Warn, Bibel) 0.30: Add new Icons (Youtube, Twitch, MS TODO, Teams, Snapchat, Signal, Post & DHL, Nina, Lieferando, Kalender, Discord, Corona Warn, Bibel)
0.31: Option to disable icon flashing 0.31: Option to disable icon flashing
0.32: Added an option to allow quiet mode to override message auto-open

View File

@ -56,9 +56,16 @@ exports.pushMessage = function(event) {
} }
// otherwise load messages/show widget // otherwise load messages/show widget
var loadMessages = Bangle.CLOCK || event.important; var loadMessages = Bangle.CLOCK || event.important;
// first, buzz
var quiet = (require('Storage').readJSON('setting.json',1)||{}).quiet; var quiet = (require('Storage').readJSON('setting.json',1)||{}).quiet;
var unlockWatch = (require('Storage').readJSON('messages.settings.json',1)||{}).unlockWatch; var appSettings = require('Storage').readJSON('messages.settings.json',1)||{};
var unlockWatch = appSettings.unlockWatch;
var quietNoAutOpn = appSettings.quietNoAutOpn;
delete appSettings;
// don't auto-open messages in quiet mode if quietNoAutOpn is true
if(quiet && quietNoAutOpn) {
loadMessages = false;
}
// first, buzz
if (!quiet && loadMessages && global.WIDGETS && WIDGETS.messages){ if (!quiet && loadMessages && global.WIDGETS && WIDGETS.messages){
WIDGETS.messages.buzz(); WIDGETS.messages.buzz();
if(unlockWatch != false){ if(unlockWatch != false){

View File

@ -1,7 +1,7 @@
{ {
"id": "messages", "id": "messages",
"name": "Messages", "name": "Messages",
"version": "0.31", "version": "0.32",
"description": "App to display notifications from iOS and Gadgetbridge/Android", "description": "App to display notifications from iOS and Gadgetbridge/Android",
"icon": "app.png", "icon": "app.png",
"type": "app", "type": "app",

View File

@ -53,6 +53,11 @@
format: v => v?/*LANG*/'Yes':/*LANG*/'No', format: v => v?/*LANG*/'Yes':/*LANG*/'No',
onchange: v => updateSetting("flash", v) onchange: v => updateSetting("flash", v)
}, },
/*LANG*/'Quiet mode disables auto-open': {
value: !!settings().quietNoAutOpn,
format: v => v?/*LANG*/'Yes':/*LANG*/'No',
onchange: v => updateSetting("quietNoAutOpn", v)
},
}; };
E.showMenu(mainmenu); E.showMenu(mainmenu);
}) })