-
Notifications
You must be signed in to change notification settings - Fork 1.3k
alarm: toggle alarms from main menu #3604
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
bb70fdf to
823eda8
Compare
|
Alarm app diff looks good to me, and so do the |
Thanks! |
|
@gfwilliams what would you say about tweaking When I tested just now, the |
|
Just tried on emulated Bangle.js 1 and got: Uncaught Error: Can't read property 'scroll' of undefined
at line 20 col 1070 in alarm.app.js
...mMenu,10,e,index,undefined,scroller.scroll,group)
^
in function "onchange" called from line 3 col 106
...onchange)a.onchange(a.value);Bangle.touchHandler==u&&d.draw(...
^
in function "select" called from line 1 col 22
a?d.move(a):d.select()
^
in function "d" called from line 1 col 3
d()
^
in function called from system
> Looking at the git blame it seems to have been around since 2023-11-14. Will open a separate PR with a fix. |
300e2e7 to
0e5761a
Compare
|
Personally, I don't think we should be including different versions of showMenu/etc in apps as it's a maintenance nightmare, but I guess you did this just so we could see what it was like? I'm up for modifying the built-in ones to pass the extra values through - those changes you made are pretty tidy, although some docs on that would be good, so it's not yet another hidden feature that gets used in only one app ;) Same for the Alarm app really - it's a nice addition, but it'd also need to be documented in the README as it's not obvious it's something that can be done, especially as different to the way the menu works in all other apps |
|
Thanks!
Yes - exactly!
Ok - will look at that 👍
... and this to! |
... either by long touch on an alarm entry or touching its icon on the right.
|
I think this is ready for merge together with espruino/Espruino#2565. |
|
Looks good, thanks! Should be compatible with older firmwares too - it just won't work? |
|
Yes, on older firmwares |
This will let the user toggle existing alarms, timers and events from the main menu of the app. Either by long touch of the menu entries or by touch on the icon on the right.
This change requires to send the touch event used in showScroller through to
alarmapp. BothshowScrollerandshowMenuneeds changes to make it work. So in this draft state of this PR I add two boot files for modifying those two functions. Have a look at the individual commits to see the diff from firmware version, which I copied over and committed unchanged before tweaking them.Test it via: https://thyttan.github.io/BangleApps/?id=alarm
The tests fail for the showMenu boot file, but it works on the watch. Enough for testing purpouses.