I expanded upon the Bonus Section with this sample gist in order to make the code more concise using Kotlin’s scoping functions. The final error data is created by concatenating any error messages from either LiveData result.

Thanks for the simple MediatorLiveData sample above Jose Alcérreca! This helped me clean up how content is passed to the views in Coinverse, by passing one complete data object, instead of observing many.

DeFi Punk

Love podcasts or audiobooks? Learn on the go with our new app.