Created
May 10, 2019 04:11
-
-
Save ivanalvarado/31e9ecf86e2c8e14f4bf52bd18d65d57 to your computer and use it in GitHub Desktop.
Naive implementation of Swipe-to-Refresh with LiveData.
This file contains 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
class UserListViewModel @Inject constructor(private val userRepository: UserRepository) : ViewModel() { | |
init { | |
} | |
// DON'T DO THIS | |
fun getUsers(): LiveData<List<UserModel>> { | |
return userRepository.getUsers() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment