PollResultsViewController

Controller responsible for managing the state and events related to poll results.

This controller processes poll data to create a view state that displays all poll options sorted by vote count (descending), with each option showing up to MAX_VOTES_TO_SHOW votes and a "Show All" button when there are more votes available. The controller does not fetch votes from the API; it uses votes already present in the poll object.

Parameters

poll

The poll containing the votes to display.

Constructors

Link copied to clipboard
constructor(poll: Poll)

Properties

Link copied to clipboard
val state: StateFlow<PollResultsViewState>

The current state of the poll results view.