features/characters_list / com.vmadalin.dynamicfeatures.characterslist.ui.list.paging / CharactersPageDataSourceFactory

CharactersPageDataSourceFactory

class CharactersPageDataSourceFactory : Factory<Int, CharacterItem>

Data source factory which also provides a way to observe the last created data source. This allows us to channel its network request status etc back to the UI.

See Also

DataSource.Factory

Constructors

<init>

Data source factory which also provides a way to observe the last created data source. This allows us to channel its network request status etc back to the UI.

CharactersPageDataSourceFactory(providerDataSource: Provider<CharactersPageDataSource>)

Properties

providerDataSource

val providerDataSource: Provider<CharactersPageDataSource>

sourceLiveData

var sourceLiveData: MutableLiveData<CharactersPageDataSource>

Functions

create

Create a DataSource.

fun create(): DataSource<Int, CharacterItem>

refresh

Force refresh data source by invalidating and re-create again.

fun refresh(): Unit

retry

Force retry last fetch operation on data source.

fun retry(): Unit