mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 08:17:04 +05:30
android: add ViewModel method to get user profile
This commit is contained in:
parent
c589ef483e
commit
f30113b483
1 changed files with 3 additions and 0 deletions
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue