Skip to content

Fix for timers showing wrong initial duration#66

Merged
brownard merged 1 commit intobrownard:masterfrom
xvello:xvello/timer-fix
Mar 11, 2026
Merged

Fix for timers showing wrong initial duration#66
brownard merged 1 commit intobrownard:masterfrom
xvello:xvello/timer-fix

Conversation

@xvello
Copy link
Copy Markdown
Contributor

@xvello xvello commented Mar 9, 2026

In v0.5.0, the first timer is displayed with the right duration, but any subsequent timers are first shown with a wrong duration, that is fixed after one second.

  • change the LaunchedEffect to update now as soon as possible: it is useless for the first timer, but needed for subsequent creations (currently, the timer is initially shown with a duration computed with an outdated now)
  • change the key to Unit, as the effect does not need to be re-created if the timers list changes

@xvello xvello force-pushed the xvello/timer-fix branch from 6d8d580 to c54530c Compare March 10, 2026 02:47
@brownard
Copy link
Copy Markdown
Owner

Thanks, I had noticed that issue! Are you happy to merge this?

@xvello
Copy link
Copy Markdown
Contributor Author

xvello commented Mar 11, 2026

Yup, fell free to squash-and-merge any of my PR after review. If they're not really I'll open them as draft.

@brownard brownard merged commit c54530c into brownard:master Mar 11, 2026
1 check passed
@xvello xvello deleted the xvello/timer-fix branch March 11, 2026 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants