-
-
Notifications
You must be signed in to change notification settings - Fork 1k
timer: Add launcher with recent timer history #2360
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
base: main
Are you sure you want to change the base?
Conversation
|
Build size and comparison to main:
|
|
Beautiful! Very nice idea! |
|
Im gonna get this onto my watch and daily drive it. Partly because of testing purposes, partly because I really like the look ;D |
02127c4 to
c32b761
Compare
8bf4814 to
e03fd26
Compare
|
Nice work! 🙂 I have two nitpicks I want to discuss:
|
e03fd26 to
33be9b2
Compare
|
I can see that 1. may be a question of personal taste.
Looks good! Sometimes it is easier with an outside perspective 😄
Nice, thank you! |
|
Two things about the code:
|
Yeah this is a good point. I was debating internally whether we need persistence at all here. For alarms, persistence is critical. For a timer MRU list... not so much? 🤷 I can just make the defaults be part of the Timer app and remove them from the settings. This will be cleaner and take up less room - also less wear on the flash storage.
Technically this is not a circular buffer, but an MRU list. A circular buffer would end up always creating a new timer entry and pushing the oldest one. You can't pop one form the middle of the array to move it to the front, you can only pop the last one out and either discard it or push it to the front (which treats it as a new timer setting). Very useful for streaming data, but not keeping track of "the most recently used timer". You'd be either duplicating the timer settings, or moving them in the wrong order. The MRU list pops the last used timer from its current position (which can be in the middle of the array) and moves it to the top. New entries get added to the top and push the last one out. Significantly simpler for this. |
|
If you go for persistence over app usages but not over reboots, you could use the timer controller to store the data. However, in #2365 there was some talk about keeping it generic. Not sure, what exactly the plan is. You are right, a ring buffer is not correct here. |
33be9b2 to
295806f
Compare
Replace timer UI with launcher screen showing 4 quick-start options: - Three most recently used timers - Add button for manual entry Recent timers display MM:SS format and auto-start when selected. Using a recent timer moves it to front of history. The + button opens timer UI to allow the user to set a new timer manually.
295806f to
69fca4d
Compare
I removed the persistence across reboots. The timer history is just stored in a static variable in the |
|
Quick chime in from me after using it for a while: This PR is really a game changer! I only use the same 2 or 3 timers so this saves me a bunch of time I would spend just holding my finger on the +-sign, love it! Regarding the sorting of the presets, I would personally go with recency rather than sorting by value. I reckon that way it's more intuitive for the user. |

Replace timer UI with launcher screen showing 4 quick-start options:
Recent timers display MM:SS format and auto-start when selected. Usinga recent timer moves it to front of history. The + button opens timer UI to allow the user to set a new timer manually.
Fixes #985
Fixes #1991