Each component’s ViewModel manages data fetching, state transitions, and business logic via LiveData. You can access it to configure request parameters, observe state changes, or manipulate the data list directly.
Accessing the ViewModel
Configuring Data Fetching with RequestBuilders
Use setConversationsRequestBuilder to control what data the component fetches. The builder accepts SDK parameters like limits, tags, and filters.
Pass the builder object, not the result of .build(). The component calls .build() internally.
LiveData Observables
The ViewModel exposes LiveData observables you can observe for custom logic:
Mutation Methods
The ViewModel provides methods to programmatically manipulate the data list:
Lifecycle Callbacks
Intercept data loading lifecycle events with these callbacks on the View: