[Alarms & Timers] Fix repeat when user unchecks ALL the days

pull/1860/head
Alessandro Cocco 2022-05-20 22:26:36 +02:00
parent f1170b3e34
commit de56796580
1 changed files with 6 additions and 1 deletions

View File

@ -217,7 +217,12 @@ function showEditRepeatMenu(repeat, dow, dowChangeCallback) {
function showCustomDaysMenu(dow, dowChangeCallback, originalRepeat, originalDow) {
const menu = {
"": { "title": /*LANG*/"Custom Days" },
"< Back": () => dowChangeCallback(true, dow),
"< Back": () => {
// If the user unchecks all the days then we assume repeat = once
// and we force the dow to every day.
var repeat = dow > 0;
dowChangeCallback(repeat, repeat ? dow : EVERY_DAY)
}
};
require("date_utils").dows(firstDayOfWeek).forEach((day, i) => {