-
public interface QueryChannelsControllerThe 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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classQueryChannelsController.ChannelsState
-
Method Summary
Modifier and Type Method Description abstract FilterObjectgetFilter()The filter used for this query abstract QuerySort<Channel>getSort()The sort used for this query abstract ChatEventHandlergetChatEventHandler()Instance of ChatEventHandler that handles logic of event handling for this QueryChannelsController. abstract UnitsetChatEventHandler(ChatEventHandler chatEventHandler)Instance of ChatEventHandler that handles logic of event handling for this QueryChannelsController. abstract BooleangetRecoveryNeeded()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 Typically we recommend using channelsState instead, it's a bit more complex but ensures that you're handling all edge cases abstract LiveData<QueryChannelsController.ChannelsState>getChannelsState()Similar to the channels field, but returns the a ChannelsState object This sealed class makes it easier to verify that you've implemented all possible error/no result states abstract LiveData<Boolean>getLoading()If we are currently loading channels abstract LiveData<Boolean>getLoadingMore()If we are currently loading more channels -
-
Method Detail
-
getFilter
abstract FilterObject getFilter()
The filter used for this query
-
getSort
abstract QuerySort<Channel> getSort()
The sort used for this query
-
getChatEventHandler
abstract ChatEventHandler getChatEventHandler()
Instance of ChatEventHandler that handles logic of event handling for this QueryChannelsController.
-
setChatEventHandler
abstract Unit setChatEventHandler(ChatEventHandler chatEventHandler)
Instance of ChatEventHandler that handles logic of event handling for this QueryChannelsController.
-
getRecoveryNeeded
abstract Boolean getRecoveryNeeded()
If the API call failed and we need to rerun this query
-
getEndOfChannels
abstract LiveData<Boolean> getEndOfChannels()
If we've reached the end of the channels
-
getChannels
abstract LiveData<List<Channel>> getChannels()
The list of channels Typically we recommend using channelsState instead, it's a bit more complex but ensures that you're handling all edge cases
-
getChannelsState
abstract LiveData<QueryChannelsController.ChannelsState> getChannelsState()
Similar to the channels field, but returns the a ChannelsState object This sealed class makes it easier to verify that you've implemented all possible error/no result states
-
getLoading
abstract LiveData<Boolean> getLoading()
If we are currently loading channels
-
getLoadingMore
abstract LiveData<Boolean> getLoadingMore()
If we are currently loading more channels
-
-
-
-