Skip to content

Commit

Permalink
Do not reset configuration if it is back to defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
ldeso committed Mar 29, 2024
1 parent 5dce4bd commit 31e00c1
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,10 @@ class ClockViewModel(
val newTime = duration + increment
_whiteTime.value = newTime
_blackTime.value = newTime
_clockState.value = ClockState.SOFT_RESET
_clockState.value = if (duration == defaultDuration && increment == defaultIncrement) {
ClockState.FULL_RESET
} else {
ClockState.SOFT_RESET
}
}
}

0 comments on commit 31e00c1

Please sign in to comment.