Created
July 12, 2018 13:22
-
-
Save JoseAlcerreca/b451078d1762d9614ea8f1c9309add4c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun getDataForUser(newUser: String?): LiveData<UserDataResult> { | |
if (newUser == null) { | |
return MutableLiveData<UserDataResult>().apply { value = null } | |
} | |
return userOnlineDataSource.getOnlineTime(newUser) | |
.combineAndCompute(userCheckinsDataSource.getCheckins(newUser)) { a, b -> | |
UserDataSuccess(a, b) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment