Skip to content

Commit d11b6ea

Browse files
committed
fix: detection of silent mode in relation to "Quiet Mode Schedule and Widget" (https://github.com/espruino/BangleApps/tree/master/apps/qmsched)
chore: updated version information
1 parent 61375e9 commit d11b6ea

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

apps/grandfatherclock/ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
0.01: New Widget!
22
0.02: rename, new icon, settings menu!
3+
0.03: added option to follow silent mode

apps/grandfatherclock/metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{ "id": "grandfatherclock",
22
"name": "Grandfather Clock Widget",
33
"shortName":"Grandfather Clock",
4-
"version":"0.02",
4+
"version":"0.03",
55
"description": "A widget that chimes every fraction of an hour (similar to Chimer), and counts out the fractions and the o'clock hour.",
66
"icon": "icon.png",
77
"type": "widget",

apps/grandfatherclock/widget.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,18 @@
2525
}
2626
}
2727
};
28-
const quietMode= (require("Storage").readJSON("setting.json", 1) || {}).quiet && config.followQuietMode;
2928

3029
let date;
3130
let fractionMs = 3600000 / config.fractions_of_hour;
3231

3332
let chime = function () {
34-
if (quietMode) return;
33+
34+
const quietMode= (require("Storage").readJSON("setting.json", 1) || {}).quiet && config.followQuietMode;
35+
if (quietMode){
36+
queueNextChime();
37+
return;
38+
}
39+
3540
date = new Date();
3641
let hourFrac = Math.floor(date.getMinutes() / (60 / config.fractions_of_hour));
3742

0 commit comments

Comments
 (0)