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