Dataflow mediator for LiveData
Library ID dataflow-mediator-livedata


Thread safety


Unfortunately LiveDatas can only be changed from the main (UI) thread. In order to achieve a full compatibility, you must ensure that all changes to fields that cause a LiveData to change happen on the main thread.

This is necessary because otherwise, after changing the Field from a background thread, the value of the LiveData won't be synchronized with the one in the Field.

As a workaround, you can call postValue() or setOrPostValue() to ensure that the value will be changed on the main thread.