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