mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 21:48:50 +03:00
Reorder classes so that it follows the poll status logical order
This commit is contained in:
parent
e2bbc3f8ae
commit
c1ea653561
1 changed files with 15 additions and 11 deletions
|
@ -16,7 +16,21 @@
|
|||
|
||||
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.
|
||||
|
@ -37,14 +51,4 @@ sealed class PollOptionViewState(open val id: String, open val name: String) {
|
|||
val votePercentage: Double,
|
||||
val isWinner: Boolean
|
||||
) : 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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue