class QueryChannelsControllerImpl : QueryChannelsController
<init> |
QueryChannelsControllerImpl(queryEntity: QueryChannelsEntity, filter: FilterObject, sort: QuerySort?, client: ChatClient, domainImpl: ChatDomainImpl, newChannelEventFilter: ((Channel, FilterObject) -> Boolean)? = null) |
channels |
The list of channels var channels: LiveData<List<Channel>> |
endOfChannels |
If we've reached the end of the channels val endOfChannels: LiveData<Boolean> |
filter |
The filter used for this query var filter: FilterObject |
job |
A livedata object with the channels matching this query. val job: CompletableJob |
loading |
If we are currently loading channels val loading: LiveData<Boolean> |
loadingMore |
If we are currently loading more channels val loadingMore: LiveData<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 var newChannelEventFilter: ((Channel, FilterObject) -> Boolean)? |
recoveryNeeded |
If the API call failed and we need to rerun this query var recoveryNeeded: Boolean |
scope |
val scope: CoroutineScope |
sort |
The sort used for this query var sort: QuerySort? |
handleEvent |
fun handleEvent(event: ChatEvent): Unit |
handleEvents |
fun handleEvents(events: List<ChatEvent>): Unit |
loadMore |
suspend fun loadMore(limit: Int = 30, messageLimit: Int = 10): Result<List<Channel>> |
loadMoreRequest |
fun loadMoreRequest(limit: Int = 30, messageLimit: Int = 10): QueryChannelsPaginationRequest |
paginateChannelIds |
fun paginateChannelIds(channelIds: SortedSet<String>, pagination: QueryChannelsPaginationRequest): List<String> |
query |
suspend fun query(limit: Int = 30, messageLimit: Int = 10): Result<List<Channel>> |
runQuery |
suspend fun runQuery(pagination: QueryChannelsPaginationRequest): Result<List<Channel>> |
runQueryOffline |
suspend fun runQueryOffline(pagination: QueryChannelsPaginationRequest): List<Channel>? |
runQueryOnline |
suspend fun runQueryOnline(pagination: QueryChannelsPaginationRequest): Result<List<Channel>> |
updateChannel |
fun updateChannel(c: Channel): Unit |