Package 

Interface ActivityListState


  • 
    public interface ActivityListState
    
                        

    An observable state object that manages the activities list and handles real-time updates.

    ActivityListState provides a reactive interface for observing changes to the activities list, including pagination state and real-time updates from WebSocket events. It automatically handles sorting, merging, and updating activities as they change.

    Example usage:

    val activityList = client.activityList(query)
    activityList.state.activities.collectLatest { activities ->
      // Update UI with new activities
    }
    • Method Summary

      Modifier and Type Method Description
      abstract ActivitiesQuery getQuery() The query configuration used for fetching activities.
      abstract StateFlow<List<ActivityData>> getActivities() All the paginated activities in the current list.
      abstract PaginationData getPagination() Last pagination information from the most recent request.
      Boolean getCanLoadMore()
      • Methods inherited from class java.lang.Object

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

      • getQuery

         abstract ActivitiesQuery getQuery()

        The query configuration used for fetching activities.

        This property contains the filtering, sorting, and pagination parameters that define how activities should be fetched and displayed.

      • getActivities

         abstract StateFlow<List<ActivityData>> getActivities()

        All the paginated activities in the current list.

        This property contains all activities that have been fetched and merged, maintaining the proper sort order. It automatically updates when new activities are loaded, when real-time events occur, or when activities are modified.

      • getPagination

         abstract PaginationData getPagination()

        Last pagination information from the most recent request.

        This property contains the pagination cursors and metadata from the last successful request. It is used to determine if more activities can be loaded and to construct subsequent pagination requests.