From 302e98ac3f20e11bd13f981fb1b18cf1cb2abfaa Mon Sep 17 00:00:00 2001 From: David Peer Date: Thu, 18 Aug 2022 22:25:51 +0200 Subject: [PATCH] Minor fix --- apps/bwclk/app.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/apps/bwclk/app.js b/apps/bwclk/app.js index 599a780f2..887934998 100644 --- a/apps/bwclk/app.js +++ b/apps/bwclk/app.js @@ -223,11 +223,6 @@ if(agenda !== undefined){ agendaIdx -= 1; } - function firstAgendaEntry(){ - agendaIdx = 0; - } - - menu.push([ function(){ var now = new Date(); @@ -241,7 +236,7 @@ if(agenda !== undefined){ var dateStr = locale.date(date).replace(/\d\d\d\d/,""); dateStr += entry.durationInSeconds < 86400 ? " | " + locale.time(date,1) : ""; - return [title + "\n" + dateStr, undefined, () => nextAgendaEntry(), () => previousAgendaEntry(), () => firstAgendaEntry()] + return [title + "\n" + dateStr, undefined, () => nextAgendaEntry(), () => previousAgendaEntry(), null] }, ]); } @@ -657,7 +652,7 @@ Bangle.on('touch', function(btn, e){ if(is_center){ var menuEntry = getMenuEntry(); - if(menuEntry.length > 4){ + if(menuEntry.length > 4 && menuEntry[4] != null){ Bangle.buzz(80, 0.6).then(()=>{ try{ menuEntry[4]();