mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-16 12:00:03 +03:00
Removing new added fields in PollSummary
This commit is contained in:
parent
753875ba0c
commit
60d3ae6cc5
2 changed files with 0 additions and 5 deletions
|
@ -22,13 +22,11 @@ sealed interface PollSummary {
|
|||
val id: String
|
||||
val creationTimestamp: Long
|
||||
val title: String
|
||||
val optionViewStates: List<PollOptionViewState>
|
||||
|
||||
data class ActivePoll(
|
||||
override val id: String,
|
||||
override val creationTimestamp: Long,
|
||||
override val title: String,
|
||||
override val optionViewStates: List<PollOptionViewState>,
|
||||
) : PollSummary
|
||||
|
||||
data class EndedPoll(
|
||||
|
@ -37,6 +35,5 @@ sealed interface PollSummary {
|
|||
override val title: String,
|
||||
val totalVotes: Int,
|
||||
val winnerOptions: List<PollOptionViewState.PollEnded>,
|
||||
override val optionViewStates: List<PollOptionViewState>,
|
||||
) : PollSummary
|
||||
}
|
||||
|
|
|
@ -70,14 +70,12 @@ class PollSummaryMapper @Inject constructor(
|
|||
title = pollTitle,
|
||||
totalVotes = pollResponseData.totalVotes,
|
||||
winnerOptions = pollOptionViewStateFactory.createPollEndedOptions(pollCreationInfo, pollResponseData),
|
||||
optionViewStates = pollOptionViewStateFactory.createPollSendingOptions(pollCreationInfo),
|
||||
)
|
||||
} else {
|
||||
PollSummary.ActivePoll(
|
||||
id = eventId,
|
||||
creationTimestamp = creationTimestamp,
|
||||
title = pollTitle,
|
||||
optionViewStates = pollOptionViewStateFactory.createPollSendingOptions(pollCreationInfo),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue