PollResultsViewState

data class PollResultsViewState(val pollName: String, val results: List<PollResultsViewState.ResultItem>)

Represents the state of the poll results view.

Contains the poll name and a list of result items, where each item represents one poll option with its vote count, winner status, preview of votes, and whether to show the "Show All" button.

Parameters

pollName

The name of the poll.

results

The list of poll result items, typically sorted by vote count in descending order.

Constructors

Link copied to clipboard
constructor(pollName: String, results: List<PollResultsViewState.ResultItem>)

Types

Link copied to clipboard
data class ResultItem(val option: Option, val isWinner: Boolean, val voteCount: Int, val votes: List<Vote>, val showAllButton: Boolean = false)

Represents a single poll result item for one option.

Properties

Link copied to clipboard
Link copied to clipboard