app / de.uniks.codliners.stock_simulator / sourcedLiveData

sourcedLiveData

fun <T> sourcedLiveData(vararg sources: LiveData<*>, block: () -> T?): LiveData<T>

Creates a LiveData that is updated every time one of the sources changes.

Parameters

T - The type of the LiveData.

sources - The sources of the returned LiveData.

block - Called every time a source changes. Its result is only applied if it differs from the current value.

Return
The initialized LiveData.

Author
Jan Müller