PollOptionVotesViewController

class PollOptionVotesViewController(poll: Poll, option: Option, chatClient: ChatClient = ChatClient.instance(), scope: CoroutineScope)

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

This controller handles fetching votes for a specific poll option from the API with pagination support. It automatically loads the first page on initialization and supports loading additional pages when PollOptionVotesViewAction.LoadMoreRequested is triggered. The controller emits state updates and error events for the UI to react to.

Parameters

poll

The poll containing the option for which votes are displayed.

option

The specific poll option for which vote results are fetched.

chatClient

The ChatClient instance used for querying poll votes from the API.

scope

The CoroutineScope used for launching coroutines.

Constructors

Link copied to clipboard
constructor(poll: Poll, option: Option, chatClient: ChatClient = ChatClient.instance(), scope: CoroutineScope)

Properties

Link copied to clipboard

One shot events triggered by the controller.

Link copied to clipboard

The current state of the poll option votes view.

Functions

Link copied to clipboard

Handles an PollOptionVotesViewAction coming from the View layer.