Package 

Interface QueryChannelsController


  • 
    public interface QueryChannelsController
    
                        

    The QueryChannelsController is a small helper to show a list of channels

    • .channels a livedata object with the list of channels. this list

    • .loading if we're currently loading

    • .loadingMore if we're currently loading more channels

    • Method Summary

      Modifier and Type Method Description
      abstract FilterObject getFilter() The filter used for this query
      abstract QuerySort<Channel> getSort() The sort used for this query
      abstract Function2<Channel, FilterObject, Boolean> getNewChannelEventFilter() When the NotificationAddedToChannelEvent is triggered the newChannelEventFilter determines if the channel should be added to the query or not.
      abstract Boolean getRecoveryNeeded() If the API call failed and we need to rerun this query
      abstract LiveData<Boolean> getEndOfChannels() If we've reached the end of the channels
      abstract LiveData<List<Channel>> getChannels() The list of channels
      abstract LiveData<Boolean> getLoading() If we are currently loading channels
      abstract LiveData<Boolean> getLoadingMore() If we are currently loading more channels
      abstract Unit setNewChannelEventFilter(Function2<Channel, FilterObject, Boolean> newChannelEventFilter) When the NotificationAddedToChannelEvent is triggered the newChannelEventFilter determines if the channel should be added to the query or not.
      • Methods inherited from class io.getstream.chat.android.livedata.controller.QueryChannelsController

        equals, hashCode, toString
      • Methods inherited from class java.lang.Object

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

      • getFilter

         abstract FilterObject getFilter()

        The filter used for this query

      • getSort

         abstract QuerySort<Channel> getSort()

        The sort used for this query

      • getNewChannelEventFilter

         abstract Function2<Channel, FilterObject, Boolean> getNewChannelEventFilter()

        When the NotificationAddedToChannelEvent is triggered the newChannelEventFilter determines if the channel should be added to the query or not. Return true to add the channel, return false to ignore it. By default it will simply add every channel for which this event is received

      • setNewChannelEventFilter

         abstract Unit setNewChannelEventFilter(Function2<Channel, FilterObject, Boolean> newChannelEventFilter)

        When the NotificationAddedToChannelEvent is triggered the newChannelEventFilter determines if the channel should be added to the query or not. Return true to add the channel, return false to ignore it. By default it will simply add every channel for which this event is received