v1.2.0
Flux Hourglass 1.2.0
Two ergonomic improvements that make the timer feel less like a one-shot
demo and more like a tool you reach for repeatedly.
Highlights
- Completion chime. When the timer finishes, a soft three-note chime
plays on the notification audio stream alongside the existing vibration
pulse. Volume is intentionally subdued so it does not intrude on
meditation or focus sessions; if the device is silent, only the
vibration fires. - Remembers your last duration. A small DataStore Preferences file
persists the most recent H R / M I N / S E C the user pressed
S T A R Twith. The next time the app launches, the pickers are
pre-seeded with that value — no extra preset tap needed.
Implementation notes
TimerPreferencesis a thin wrapper over aPreferencesDataStore
namedtimer_prefs. Reads are clamped to the same ranges as the picker
(0..99hours,0..59minutes/seconds) so corrupt or out-of-range
storage cannot crash the UI.- The chime uses
ToneGenerator(STREAM_NOTIFICATION, 70)so it respects
the user's silent/DnD profile and does not require any new permission. - Seed reads happen with
runBlocking { observe(context).first() }
during composition. The first launch hits the disk once; everything
after that is in the Compose state.