Skip to content

v1.2.0

Choose a tag to compare

@github-actions github-actions released this 15 Jun 00:43

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 T with. The next time the app launches, the pickers are
    pre-seeded with that value — no extra preset tap needed.

Implementation notes

  • TimerPreferences is a thin wrapper over a Preferences DataStore
    named timer_prefs. Reads are clamped to the same ranges as the picker
    (0..99 hours, 0..59 minutes/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.