{% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

CombinedLoadStates

class CombinedLoadStates


Collection of pagination LoadStates for both a PagingSource, and RemoteMediator.

Summary

Public constructors

Public functions

open operator Boolean
equals(other: Any?)
open Int
open String

Public properties

<Error class: unknown class>

Convenience for combined behavior of LoadType.REFRESH LoadState, which generally defers to mediator if it exists, but if previously was LoadState.Loading, awaits for both source and mediator to become LoadState.NotLoading to ensure the remote load was applied.

<Error class: unknown class>?

LoadStates corresponding to loads from a RemoteMediator, or null if RemoteMediator not present.

<Error class: unknown class>

Convenience for combined behavior of LoadType.REFRESH LoadState, which generally defers to mediator if it exists, but if previously was LoadState.Loading, awaits for both source and mediator to become LoadState.NotLoading to ensure the remote load was applied.

<Error class: unknown class>

Convenience for combined behavior of LoadType.REFRESH LoadState, which generally defers to mediator if it exists, but if previously was LoadState.Loading, awaits for both source and mediator to become LoadState.NotLoading to ensure the remote load was applied.

<Error class: unknown class>

LoadStates corresponding to loads from a PagingSource.

Public constructors

CombinedLoadStates

CombinedLoadStates(
    refresh: <Error class: unknown class>,
    prepend: <Error class: unknown class>,
    append: <Error class: unknown class>,
    source: <Error class: unknown class>,
    mediator: <Error class: unknown class>? = null
)

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

append

val append<Error class: unknown class>

Convenience for combined behavior of LoadType.REFRESH LoadState, which generally defers to mediator if it exists, but if previously was LoadState.Loading, awaits for both source and mediator to become LoadState.NotLoading to ensure the remote load was applied.

For use cases that require reacting to LoadState of source and mediator specifically, e.g., showing cached data when network loads via mediator fail, LoadStates exposed via source and mediator should be used directly.

mediator

val mediator<Error class: unknown class>?

LoadStates corresponding to loads from a RemoteMediator, or null if RemoteMediator not present.

prepend

val prepend<Error class: unknown class>

Convenience for combined behavior of LoadType.REFRESH LoadState, which generally defers to mediator if it exists, but if previously was LoadState.Loading, awaits for both source and mediator to become LoadState.NotLoading to ensure the remote load was applied.

For use cases that require reacting to LoadState of source and mediator specifically, e.g., showing cached data when network loads via mediator fail, LoadStates exposed via source and mediator should be used directly.

refresh

val refresh<Error class: unknown class>

Convenience for combined behavior of LoadType.REFRESH LoadState, which generally defers to mediator if it exists, but if previously was LoadState.Loading, awaits for both source and mediator to become LoadState.NotLoading to ensure the remote load was applied.

For use cases that require reacting to LoadState of source and mediator specifically, e.g., showing cached data when network loads via mediator fail, LoadStates exposed via source and mediator should be used directly.

source

val source<Error class: unknown class>

LoadStates corresponding to loads from a PagingSource.