forked from FOSS/BangleApps
commit
6c0bb9d9e3
|
@ -5,3 +5,4 @@
|
||||||
0.05: Show calendar colors & improved all day events.
|
0.05: Show calendar colors & improved all day events.
|
||||||
0.06: Improved multi-line locations & titles
|
0.06: Improved multi-line locations & titles
|
||||||
0.07: Buzz 30, 15 and 1 minute before an event
|
0.07: Buzz 30, 15 and 1 minute before an event
|
||||||
|
0.08: No buzz during quiet hours & tweaked 30-minute buzz
|
||||||
|
|
|
@ -119,10 +119,12 @@ function fullRedraw() {
|
||||||
|
|
||||||
function buzzForEvents() {
|
function buzzForEvents() {
|
||||||
let nextEvent = next[0]; if (!nextEvent) return;
|
let nextEvent = next[0]; if (!nextEvent) return;
|
||||||
if (nextEvent.allDay) return;
|
// No buzz for all day events or events before 7am
|
||||||
|
// TODO: make this configurable
|
||||||
|
if (nextEvent.allDay || (new Date(nextEvent.timestamp * 1000)).getHours() < 7) return;
|
||||||
let minToEvent = Math.round((nextEvent.timestamp - getTime()) / 60.0);
|
let minToEvent = Math.round((nextEvent.timestamp - getTime()) / 60.0);
|
||||||
switch (minToEvent) {
|
switch (minToEvent) {
|
||||||
case 30: require("buzz").pattern(","); break;
|
case 30: require("buzz").pattern(":"); break;
|
||||||
case 15: require("buzz").pattern(", ,"); break;
|
case 15: require("buzz").pattern(", ,"); break;
|
||||||
case 1: require("buzz").pattern(": : :"); break;
|
case 1: require("buzz").pattern(": : :"); break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"id": "calclock",
|
"id": "calclock",
|
||||||
"name": "Calendar Clock",
|
"name": "Calendar Clock",
|
||||||
"shortName": "CalClock",
|
"shortName": "CalClock",
|
||||||
"version": "0.07",
|
"version": "0.08",
|
||||||
"description": "Show the current and upcoming events synchronized from Gadgetbridge",
|
"description": "Show the current and upcoming events synchronized from Gadgetbridge",
|
||||||
"icon": "calclock.png",
|
"icon": "calclock.png",
|
||||||
"type": "clock",
|
"type": "clock",
|
||||||
|
|
Loading…
Reference in New Issue