Makes PollState a sealed interface
This commit is contained in:
parent
a2d18d460a
commit
a46901ad6c
|
@ -16,12 +16,12 @@
|
|||
|
||||
package im.vector.app.features.poll
|
||||
|
||||
sealed class PollState {
|
||||
object Sending : PollState()
|
||||
object Ready : PollState()
|
||||
data class Voted(val votes: Int) : PollState()
|
||||
object Undisclosed : PollState()
|
||||
object Ended : PollState()
|
||||
sealed interface PollState {
|
||||
object Sending : PollState
|
||||
object Ready : PollState
|
||||
data class Voted(val votes: Int) : PollState
|
||||
object Undisclosed : PollState
|
||||
object Ended : PollState
|
||||
|
||||
fun isVotable() = this !is Sending && this !is Ended
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue