Files
Simple-Clock/app/src/main/kotlin/com/simplemobiletools/clock/models/TimerState.kt
Paul Akhamiogu 8474e6a800 handle multiple timer states
- feat: separate timer actions from states by adding a new class TimerEvent to hold actions Reset, Start, Pause, Finish, Refesh that could be performed on a timer.
- feat: handle multiple countdown timers in the App file by creating a map of the timer id to the countdown timer.
- fix: use gson instance from  TypeAdapter in Room's Converters class
- ref: remove scroll view parent from each timer item, a fix for the keyboard obscuring a label will be implemented in a future commit
2021-09-01 19:58:38 +01:00

9 lines
285 B
Kotlin

package com.simplemobiletools.clock.models
sealed class TimerState {
object Idle : TimerState()
data class Running(val duration: Long, val tick: Long) : TimerState()
data class Paused(val duration: Long, val tick: Long) : TimerState()
object Finished : TimerState()
}