Package 

Interface ActivityReactionListState


  • 
    public interface ActivityReactionListState
    
                        

    An observable state object that manages the current state of an activity reaction list.

    This class provides reactive state management for a collection of activity reactions. It automatically handles real-time updates when reactions are added or removed from the activity, and maintains pagination state for loading additional reactions.

    // Access the state from an ActivityReactionList
    val reactionList = feedsClient.activityReactionList(query)
    val state = reactionList.state
    
    // Observe reaction changes
    state.reactions.collect { reactions ->
       // Update UI with new reactions
    }
    
    // Check pagination status
    if (state.canLoadMore) {
       // Load more reactions
    }
    
    // Access current reactions
    val currentReactions = state.reactions.value
    • Method Detail

      • getQuery

         abstract ActivityReactionsQuery getQuery()

        The query configuration used to fetch activity reactions.

        This contains the activity ID, filters, sorting options, and pagination parameters that define how reactions should be fetched and displayed.

      • getReactions

         abstract StateFlow<List<FeedsReactionData>> getReactions()

        The current collection of activity reactions.

        This array contains all the reactions that have been loaded for the activity. The reactions are automatically sorted according to the query configuration. Changes to this array are published and can be observed for UI updates.

      • getPagination

         abstract PaginationData getPagination()

        The pagination information from the last query.

        This contains the pagination cursors (next and previous) that can be used to fetch additional pages of reactions. The pagination data is automatically updated when new pages are loaded.