avoid setting 0 seconds at the timer, set to 10 by default

This commit is contained in:
tibbi 2018-03-28 17:37:33 +02:00
parent 247009602e
commit 290267594e
1 changed files with 3 additions and 2 deletions

View File

@ -50,8 +50,9 @@ class TimerFragment : Fragment() {
timer_initial_time.setOnClickListener {
MyTimePickerDialogDialog(activity as SimpleActivity, config.timerSeconds) {
config.timerSeconds = it
timer_initial_time.text = it.getFormattedDuration()
val seconds = if (it <= 0) 10 else it
config.timerSeconds = seconds
timer_initial_time.text = seconds.getFormattedDuration()
if (!isRunning) {
resetTimer()
}