Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
[Unreleased]
-----------

### Bug Fixes

* **Round count not updating while timer is active** — changing the number of work rounds in Settings while the timer is running or paused now immediately updates the round indicator in the main UI. Previously the frontend only received a state snapshot when the timer was idle, so the "X of Y" display required a manual Reset to reflect the new total. The snapshot is now always broadcast after a settings change; the active countdown is unaffected since the `timer:reset` event only updates the UI store, and any momentary `total_secs` discrepancy is corrected by the next `timer:tick` within one second.

[v1.1.0] - 2026-03-09
-----------

Expand Down
15 changes: 6 additions & 9 deletions src-tauri/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,12 @@ pub fn settings_set(
// Keep the timer engine in sync when time-related settings change.
timer.apply_settings(new_settings.clone());

// If the timer is idle, broadcast a reset snapshot immediately so the
// frontend's dial and display reflect the new duration without requiring
// the user to manually start/reset the timer.
{
let snap = timer.get_snapshot();
if !snap.is_running && !snap.is_paused {
app.emit("timer:reset", &snap).ok();
}
}
// Broadcast an updated snapshot so the frontend immediately reflects any
// changed settings (round count, durations, etc.) regardless of timer
// state. The timer:reset handler only calls timerState.set(), so emitting
// while running does not interrupt the countdown; the next timer:tick
// event will reconcile total_secs from the engine within one second.
app.emit("timer:reset", &timer.get_snapshot()).ok();

// Propagate volume and tick-sound changes to the audio engine (optional state).
if let Some(audio) = app.try_state::<Arc<AudioManager>>() {
Expand Down
Loading