-
public final class ThreadListViewModel extends ViewModel
ViewModel responsible for managing the state of a threads list.
-
-
Field Summary
Fields Modifier and Type Field Description private final StateFlow<ThreadListState>state
-
Constructor Summary
Constructors Constructor Description ThreadListViewModel(ThreadListController controller)
-
Method Summary
Modifier and Type Method Description final StateFlow<ThreadListState>getState()The current thread list state. final Unitload()Loads the initial data when requested. final UnitloadNextPage()Loads more data when requested. -
-
Method Detail
-
getState
final StateFlow<ThreadListState> getState()
The current thread list state.
-
load
final Unit load()
Loads the initial data when requested. Overrides all previously retrieved data.
-
loadNextPage
final Unit loadNextPage()
Loads more data when requested.
Does nothing if the end of the list has already been reached or loading is already in progress.
-
-
-
-