Class SearchViewModel.State
-
- All Implemented Interfaces:
public final class SearchViewModel.StateRepresents the search screen state, used to render the required UI.
-
-
Field Summary
Fields Modifier and Type Field Description private final Stringqueryprivate final BooleancanLoadMoreprivate final List<Message>resultsprivate final BooleanisLoadingprivate final BooleanisLoadingMore
-
Method Summary
Modifier and Type Method Description final StringgetQuery()final BooleangetCanLoadMore()final List<Message>getResults()final BooleanisLoading()final BooleanisLoadingMore()-
-
Constructor Detail
-
SearchViewModel.State
SearchViewModel.State(String query, Boolean canLoadMore, List<Message> results, Boolean isLoading, Boolean isLoadingMore)
- Parameters:
query- The current search query value.canLoadMore- If we've reached the end of messages, to stop triggering pagination.results- The found messages to render.isLoading- If we're currently loading data (initial load).isLoadingMore- If we're loading more items (pagination).
-
-
Method Detail
-
getCanLoadMore
final Boolean getCanLoadMore()
-
getResults
final List<Message> getResults()
-
isLoadingMore
final Boolean isLoadingMore()
-
-
-
-