From a46901ad6c2c939aab9507988da3f4bc80a0354c Mon Sep 17 00:00:00 2001 From: ericdecanini Date: Tue, 15 Mar 2022 18:10:47 +0100 Subject: [PATCH] Makes PollState a sealed interface --- .../java/im/vector/app/features/poll/PollState.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/poll/PollState.kt b/vector/src/main/java/im/vector/app/features/poll/PollState.kt index 3352c3ad05..93cdb0ecbe 100644 --- a/vector/src/main/java/im/vector/app/features/poll/PollState.kt +++ b/vector/src/main/java/im/vector/app/features/poll/PollState.kt @@ -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 }