Package 

Interface QueryChannelsState


  • 
    public interface QueryChannelsState
    
                        

    Contains a state related to a single query channels request.

    • Method Detail

      • getFilter

         abstract FilterObject getFilter()

        The filter associated with this query channels state.

        For grouped queries (states keyed by QueryChannelsIdentifier.Grouped), this is the group's io.getstream.chat.android.models.GroupedChannelsGroupQuery.filter from the latest request, or io.getstream.chat.android.models.Filters.neutral when the group has none.

      • getSort

         abstract QuerySorter<Channel> getSort()

        The sort associated with this query channels state.

        For grouped queries (states keyed by QueryChannelsIdentifier.Grouped), this orders channels by query_timestamp descending when the latest request asked for it: the latest of their creation, last message and custom touched_at date. It is a sorter of its own and is not equal to the requested one. Otherwise it is last_updated descending.

      • getLoading

         abstract StateFlow<Boolean> getLoading()

        If the current state is being loaded.

      • getLoadingMore

         abstract StateFlow<Boolean> getLoadingMore()

        If the current state is loading more channels (a next page is being loaded).

      • getNextCursor

         abstract StateFlow<String> getNextCursor()

        Cursor for the next page when this state belongs to a grouped query. null means there is no further page (or that this is a standard query that doesn't use cursors).

      • getChannels

         abstract StateFlow<List<Channel>> getChannels()

        The collection of channels loaded by the query channels request. The StateFlow is initialized with null which means that channels are not loaded yet.