[alarm/sched] feature: show time elapsed since alarm triggered
It'd be useful to see how long has elapsed since the alarm fired, for more time-sensitive events
Hi! What do you mean by that? Should it show when the alarm rings, or wakes up from snoozing, or should it be shown if you go into the alarm in app itself? I think it would be more useful when the alarm rings :)
Yes I agree - I'm thinking something like displaying {n}s (seconds) below the alarm name (here, "1m"). The amount would then tick up as time goes on to show how long the alarm's been sounding for.
So would it be for alarms, timers, or both?
I can get to work on this :)
Oh yes both I think, would you agree? Happy to get involved, feel free to tag me in any work-in-progress PRs :)
Of course!
For this, is there a way to update the prompt without needing to do a new E.showPrompt(...) for every second? (for timers, as precision might matter...)
For that case I would probably just do a clearRect on the area for the second and write the next second manually with setInterval. Should be easy and light weight? Just be careful to clear the interval when the user navigates away.
Nice, would I get the area manually? I don't think there's a function to get the area one part of text covers...
If we do do it manually, it needs testing for Bangle.js 1
Hm, I think there may not be a way to work it out programmatically. So it's a bit hacky and maybe a bit of a head ache to maintain. I guess we opted to avoid that with the long press snooze menu...
I guess it would not be impossible to integrate something like it inside showPrompt both for Bangle.js 1 and 2. It just feels a little overkill at first thought to me.
Yeah, I suppose unlike showMenu, there's no object we can update and redraw. Bit of a tricky one...
Short of doing the prompt manually, I suppose