mirror of
https://github.com/LiveFastEatTrashRaccoon/RaccoonForLemmy.git
synced 2025-02-09 07:48:44 +01:00
fix: user detail pagination
This commit is contained in:
parent
44cabf3dbd
commit
b15b22deb1
@ -190,7 +190,7 @@ class UserDetailViewModel(
|
||||
initial = initial,
|
||||
)
|
||||
}
|
||||
mvi.scope?.launch {
|
||||
mvi.scope?.launch(Dispatchers.IO) {
|
||||
val auth = identityRepository.authToken.value
|
||||
val refreshedUser = if (otherInstance.isNotEmpty()) {
|
||||
userRepository.getOnOtherInstance(
|
||||
@ -265,6 +265,9 @@ class UserDetailViewModel(
|
||||
refreshing = false,
|
||||
)
|
||||
}
|
||||
if (!itemList.isNullOrEmpty()) {
|
||||
currentPage++
|
||||
}
|
||||
} else {
|
||||
val itemList = userRepository.getComments(
|
||||
auth = auth,
|
||||
@ -287,8 +290,10 @@ class UserDetailViewModel(
|
||||
initial = false,
|
||||
)
|
||||
}
|
||||
if (!itemList.isNullOrEmpty()) {
|
||||
currentPage++
|
||||
}
|
||||
}
|
||||
currentPage++
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user