Reorder classes so that it follows the poll status logical order

This commit is contained in:
Benoit Marty 2021-12-13 21:02:11 +01:00
parent e2bbc3f8ae
commit c1ea653561
1 changed files with 15 additions and 11 deletions

View File

@ -16,7 +16,21 @@
package im.vector.app.features.home.room.detail.timeline.item package im.vector.app.features.home.room.detail.timeline.item
sealed class PollOptionViewState(open val id: String, open val name: String) { sealed class PollOptionViewState(open val id: String,
open val name: String) {
/**
* Represents a poll that is not sent to the server yet.
*/
data class DisabledOptionWithInvisibleVotes(override val id: String,
override val name: String
) : PollOptionViewState(id, name)
/**
* Represents a poll that is sent but not voted by the user
*/
data class EnabledOptionWithInvisibleVotes(override val id: String,
override val name: String
) : PollOptionViewState(id, name)
/** /**
* Represents a poll that user already voted. * Represents a poll that user already voted.
@ -37,14 +51,4 @@ sealed class PollOptionViewState(open val id: String, open val name: String) {
val votePercentage: Double, val votePercentage: Double,
val isWinner: Boolean val isWinner: Boolean
) : PollOptionViewState(id, name) ) : PollOptionViewState(id, name)
/**
* Represents a poll that is sent but not voted by the user
*/
data class EnabledOptionWithInvisibleVotes(override val id: String, override val name: String) : PollOptionViewState(id, name)
/**
* Represents a poll that is not sent to the server yet.
*/
data class DisabledOptionWithInvisibleVotes(override val id: String, override val name: String) : PollOptionViewState(id, name)
} }