mirror of
https://github.com/SimpleMobileTools/Simple-Clock.git
synced 2025-06-05 22:19:17 +02:00
avoid setting 0 seconds at the timer, set to 10 by default
This commit is contained in:
@ -50,8 +50,9 @@ class TimerFragment : Fragment() {
|
|||||||
|
|
||||||
timer_initial_time.setOnClickListener {
|
timer_initial_time.setOnClickListener {
|
||||||
MyTimePickerDialogDialog(activity as SimpleActivity, config.timerSeconds) {
|
MyTimePickerDialogDialog(activity as SimpleActivity, config.timerSeconds) {
|
||||||
config.timerSeconds = it
|
val seconds = if (it <= 0) 10 else it
|
||||||
timer_initial_time.text = it.getFormattedDuration()
|
config.timerSeconds = seconds
|
||||||
|
timer_initial_time.text = seconds.getFormattedDuration()
|
||||||
if (!isRunning) {
|
if (!isRunning) {
|
||||||
resetTimer()
|
resetTimer()
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user