gbridge: respect Quiet Mode
parent
0c36041e18
commit
0b76f7848e
|
|
@ -139,7 +139,7 @@
|
|||
{ "id": "gbridge",
|
||||
"name": "Gadgetbridge",
|
||||
"icon": "app.png",
|
||||
"version":"0.21",
|
||||
"version":"0.22",
|
||||
"description": "The default notification handler for Gadgetbridge notifications from Android",
|
||||
"tags": "tool,system,android,widget",
|
||||
"readme": "README.md",
|
||||
|
|
|
|||
|
|
@ -21,3 +21,4 @@
|
|||
0.19: Support for call incoming/start/end
|
||||
0.20: Reduce memory usage
|
||||
0.21: Fix HRM setting
|
||||
0.22: Respect Quiet Mode
|
||||
|
|
|
|||
|
|
@ -154,7 +154,9 @@
|
|||
case "notify-":
|
||||
if (event.t === "notify") {
|
||||
require("notify").show(prettifyNotificationEvent(event));
|
||||
Bangle.buzz();
|
||||
if (!(require('Storage').readJSON('setting.json',1)||{}).quiet) {
|
||||
Bangle.buzz();
|
||||
}
|
||||
} else { // notify-
|
||||
require("notify").hide(event);
|
||||
}
|
||||
|
|
@ -174,7 +176,9 @@
|
|||
body: event.number, icon:require("heatshrink").decompress(atob("jEYwIMJj4CCwACJh4CCCIMOAQMGAQMHAQMDAQMBCIMB4PwgHz/EAn4CBj4CBg4CBgACCAAw="))}
|
||||
if (event.cmd === "incoming") {
|
||||
require("notify").show(note);
|
||||
Bangle.buzz();
|
||||
if (!(require('Storage').readJSON('setting.json',1)||{}).quiet) {
|
||||
Bangle.buzz();
|
||||
}
|
||||
} else if (event.cmd === "start") {
|
||||
require("notify").show(Object.assign(note, {
|
||||
bgColor : "#008000", titleBgColor : "#00C000",
|
||||
|
|
@ -194,6 +198,7 @@
|
|||
delete state.find;
|
||||
}
|
||||
if (event.n)
|
||||
// Ignore quiet mode: we always want to find our watch
|
||||
state.find = setInterval(_=>{
|
||||
Bangle.buzz();
|
||||
setTimeout(_=>Bangle.beep(), 1000);
|
||||
|
|
|
|||
Loading…
Reference in New Issue