Skip to content

Commit 47cbde9

Browse files
authored
Fix timer length on snooze not evaluating
1 parent 26eff07 commit 47cbde9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

apps/sched/sched.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,18 @@ function showSnoozeMenu(alarm){
1919
const alarmIndex = alarms.indexOf(alarm);
2020
const settings = require("sched").getSettings();
2121
let buzzCount = 0;
22-
22+
let buttons=
2323
Bangle.buzz(40);
2424
if(alarm.timer){
2525

2626
let timerLength=alarm.timer
27-
27+
let buttons={ "15s": 15, "30s":30,"1m":60 ,"2m":120,"5m":360};
28+
let formattedLength = formatMS(timerLength)+"*";
29+
buttons[formattedLength] = Math.round(timerLength/1000);
2830
//different button lengths
2931
E.showPrompt("Choose snooze length", {
3032
title: "Snooze Options",
31-
buttons: { "15s": 15, "30s":30,"1m":60 ,"2m":120,"5m":360,[formatMS(timerLength)]:timerLength/1000}
33+
buttons: buttons
3234
}).then(function (snoozeTime) {
3335
buzzCount = 0;
3436

0 commit comments

Comments
 (0)