Skip to content

v1.4.1

Latest

Choose a tag to compare

@spewedprojects spewedprojects released this 08 Jul 16:41

Full Changelog: v1.4.0...v1.4.1

fix(overlay): resolve overlay service initialization hang and UI visibility state

Fixed a critical bug introduced in the initial background sync implementation where the overlay bubble remained invisible and stuck at 00:00:00.

  • Bug Root Cause & Acknowledgment:

    • The newly introduced async history sync block was launched as a child coroutine on serviceScope.
    • Inside startTimerLoop(), the loop-protection guard checked if any child of serviceScope was active (serviceScope.coroutineContext[Job]?.children?.any { it.isActive }).
    • Because the background sync coroutine was running, this check evaluated to true, causing startTimerLoop() to silently return and prevent the overlay loop from running entirely.
  • Fixes Implemented:

    • Replaced the overly broad coroutine-children check with a dedicated timerRunning boolean flag to cleanly prevent duplicate timer loops without conflicts.
    • Declared private var timerRunning = false state variable.
    • Set the overlay's initial state to hidden (bubbleView.isVisible = false) upon startup, ensuring it only displays for selected/mindful apps once the timer loop resumes control.