Skip to content

Rework search by query #28

Open
Open
@daxcurson

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
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions