Alarms with hidden: true are not filtered

master
BartS23 2022-06-26 12:23:09 +02:00
parent 3bddcd402d
commit 808a94582f
3 changed files with 3 additions and 2 deletions

View File

@ -31,3 +31,4 @@
0.29: Fix wrong 'dow' handling in new timer if first day of week is Monday 0.29: Fix wrong 'dow' handling in new timer if first day of week is Monday
0.30: Fix "Enable All" 0.30: Fix "Enable All"
0.31: Add seconds to timers 0.31: Add seconds to timers
0.32: Fix wrong hidden filter

View File

@ -2,7 +2,7 @@
"id": "alarm", "id": "alarm",
"name": "Alarms & Timers", "name": "Alarms & Timers",
"shortName": "Alarms", "shortName": "Alarms",
"version": "0.31", "version": "0.32",
"description": "Set alarms and timers on your Bangle", "description": "Set alarms and timers on your Bangle",
"icon": "app.png", "icon": "app.png",
"tags": "tool,alarm,widget", "tags": "tool,alarm,widget",

View File

@ -2,7 +2,7 @@ WIDGETS["alarm"]={area:"tl",width:0,draw:function() {
if (this.width) g.reset().drawImage(atob("GBgBAAAAAAAAABgADhhwDDwwGP8YGf+YMf+MM//MM//MA//AA//AA//AA//AA//AA//AB//gD//wD//wAAAAADwAABgAAAAAAAAA"),this.x,this.y); if (this.width) g.reset().drawImage(atob("GBgBAAAAAAAAABgADhhwDDwwGP8YGf+YMf+MM//MM//MA//AA//AA//AA//AA//AA//AB//gD//wD//wAAAAADwAABgAAAAAAAAA"),this.x,this.y);
},reload:function() { },reload:function() {
// don't include library here as we're trying to use as little RAM as possible // don't include library here as we're trying to use as little RAM as possible
WIDGETS["alarm"].width = (require('Storage').readJSON('sched.json',1)||[]).some(alarm=>alarm.on&&(alarm.hidden!==false)) ? 24 : 0; WIDGETS["alarm"].width = (require('Storage').readJSON('sched.json',1)||[]).some(alarm=>alarm.on&&(alarm.hidden!==true)) ? 24 : 0;
} }
}; };
WIDGETS["alarm"].reload(); WIDGETS["alarm"].reload();