mirror of
https://github.com/LiveFastEatTrashRaccoon/RaccoonForLemmy.git
synced 2025-02-03 02:47:34 +01:00
fix: data cleared coming back to community or user detail (#158)
This commit is contained in:
parent
c787ab3be2
commit
3ffa5f15b7
@ -53,7 +53,7 @@ class CommunityDetailViewModel(
|
||||
val auth = identityRepository.authToken.value.orEmpty()
|
||||
mvi.updateState {
|
||||
it.copy(
|
||||
community = community,
|
||||
community = it.community.takeIf { c -> c.id != 0 } ?: community,
|
||||
isLogged = auth.isNotEmpty(),
|
||||
)
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ class UserDetailViewModel(
|
||||
}
|
||||
mvi.updateState {
|
||||
it.copy(
|
||||
user = user,
|
||||
user = it.user.takeIf { u -> u.id != 0 } ?: user,
|
||||
)
|
||||
}
|
||||
mvi.scope?.launch {
|
||||
|
Loading…
x
Reference in New Issue
Block a user