Makes PollState a sealed interface

This commit is contained in:
ericdecanini 2022-03-15 18:10:47 +01:00
parent a2d18d460a
commit a46901ad6c
1 changed files with 6 additions and 6 deletions

View File

@ -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
}