From 5f4c5bb8eda7a231b10cb7ab46d526cb303c3214 Mon Sep 17 00:00:00 2001 From: Jens Krause <47693+sectore@users.noreply.github.com> Date: Tue, 13 May 2025 11:00:56 +0200 Subject: [PATCH] (pomodoro) reset active clock only (#82) It reverts changes of https://github.com/sectore/timr-tui/pull/76/commits/cc35f20f3e2d21dbb13792683cb078852e1c5b1c --- CHANGELOG.md | 4 ++++ src/widgets/pomodoro.rs | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8fd97b0..ff76fdd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ - (args) set `content` by given duration [#81](https://github.com/sectore/tick-tock-tui/pull/81) +### Fixes + +- (pomodoro) reset active clock only [#82](https://github.com/sectore/tick-tock-tui/pull/82) + ## v1.3.0 - 2025-05-06 ### diff --git a/src/widgets/pomodoro.rs b/src/widgets/pomodoro.rs index cc4fcc4..d87fb69 100644 --- a/src/widgets/pomodoro.rs +++ b/src/widgets/pomodoro.rs @@ -208,9 +208,7 @@ impl TuiEventHandler for PomodoroState { if self.get_mode() == &Mode::Work && self.get_clock().is_done() { self.round += 1; } - // reset both clocks - self.clock_map.pause.reset(); - self.clock_map.work.reset(); + self.get_clock_mut().reset(); } _ => return Some(event), },