android: add ViewModel method to get user profile

This commit is contained in:
Harsh Shandilya 2022-05-05 14:54:17 +05:30
parent c589ef483e
commit f30113b483
No known key found for this signature in database
GPG key ID: 366D7BBAD1031E80

View file

@ -76,6 +76,9 @@ constructor(
suspend fun getPostComments(postId: String) =
withContext(Dispatchers.IO) { api.getPostDetails(postId) }
suspend fun getUserProfile(username: String) =
withContext(Dispatchers.IO) { api.getUser(username) }
fun refreshHottestPosts() {
hottestPostsPagingSource?.invalidate()
}