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:
parent
ffad78e093
commit
d9399eafc9
@ -2,6 +2,10 @@
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Fixes
|
||||
|
||||
(countdown) Reset `Mission Elapsed Time (MET)` if `countdown` is set by cli arguments [#71](https://github.com/sectore/timr-tui/pull/71)
|
||||
|
||||
### Misc.
|
||||
|
||||
(cargo) Exclude files for packaging [e7a5a1b](https://github.com/sectore/timr-tui/commit/e7a5a1b2da7a7967f2602a0b92f391ac768ca638)
|
||||
|
||||
@ -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")]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user