PollOptionVotesViewState

data class PollOptionVotesViewState(val option: Option, val voteCount: Int, val isWinner: Boolean, val isLoading: Boolean = true, val results: List<Vote> = emptyList(), val canLoadMore: Boolean = true, val isLoadingMore: Boolean = false)

Represents the state of the poll option votes view for a specific poll option.

This state is used when displaying all votes for a single poll option in a paginated list. It tracks loading states, pagination status, and the list of votes fetched so far.

Parameters

option

The poll option for which vote results are displayed.

voteCount

The total number of votes for this option.

isWinner

True if this option has the highest vote count and is the winner.

isLoading

True if the initial load is in progress. Defaults to true.

results

The list of votes fetched so far. Defaults to an empty list.

canLoadMore

True if there are more votes available to load via pagination. Defaults to true.

isLoadingMore

True if a pagination request is currently in progress. Defaults to false.

Constructors

Link copied to clipboard
constructor(option: Option, voteCount: Int, isWinner: Boolean, isLoading: Boolean = true, results: List<Vote> = emptyList(), canLoadMore: Boolean = true, isLoadingMore: Boolean = false)

Properties

Link copied to clipboard
val canLoadMore: Boolean = true
Link copied to clipboard
val isLoading: Boolean = true
Link copied to clipboard
val isLoadingMore: Boolean = false
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard