Package 

Class PollResultsViewController


  • 
    public final class 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.

    • Method Summary

      Modifier and Type Method Description
      final StateFlow<PollResultsViewState> getState() The current state of the poll results view.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PollResultsViewController

        PollResultsViewController(Poll poll)
        Parameters:
        poll - The poll containing the votes to display.