Open
Description
Unexpectedly, I found that a mapping method over a LiveData object can be triggered by way of a Transformations:
Transformations.switchMap(dataSourceFactory.getNetworkStatus(),
NetAlbumsPageKeyedDataSource::getNetworkState);
The switchMap allows to invoke the method in the second parameter for a change in the observed object (in the first parameter). This can be used to trigger searches on the search string, to replace the current method where a new datasource is created for each change in the search string.
Metadata
Assignees
Labels
No labels