fix(countdown): Reset MET if countdown is set by cli arguments (#71)

* fix: Reset MET if countdown is set by args

* update CHANGELOG
This commit is contained in:
Jens Krause
2025-03-03 12:21:17 +01:00
committed by GitHub
parent ffad78e093
commit d9399eafc9
2 changed files with 9 additions and 1 deletions

View File

@@ -103,7 +103,11 @@ impl From<FromAppArgs> for App {
initial_value_countdown: args.countdown.unwrap_or(stg.inital_value_countdown),
// invalidate `current_value_countdown` if an initial value is set via args
current_value_countdown: args.countdown.unwrap_or(stg.current_value_countdown),
elapsed_value_countdown: stg.elapsed_value_countdown,
elapsed_value_countdown: match args.countdown {
// reset value if countdown is set by arguments
Some(_) => Duration::ZERO,
None => stg.elapsed_value_countdown,
},
current_value_timer: stg.current_value_timer,
app_tx,
#[cfg(feature = "sound")]