mirror of
https://github.com/LiveFastEatTrashRaccoon/RaccoonForLemmy.git
synced 2025-02-08 18:58:42 +01:00
fix: comment loading in post detail (#1074)
This commit is contained in:
parent
4540ed4214
commit
ff2471ef3c
@ -185,10 +185,12 @@ class CommunityDetailViewModel(
|
||||
.distinctUntilChanged()
|
||||
.debounce(1_000)
|
||||
.onEach {
|
||||
updateState { it.copy(loading = false) }
|
||||
emitEffect(CommunityDetailMviModel.Effect.BackToTop)
|
||||
delay(50)
|
||||
refresh()
|
||||
if (!uiState.value.initial) {
|
||||
updateState { it.copy(loading = false) }
|
||||
emitEffect(CommunityDetailMviModel.Effect.BackToTop)
|
||||
delay(50)
|
||||
refresh()
|
||||
}
|
||||
}.launchIn(this)
|
||||
|
||||
lemmyValueCache.isCurrentUserAdmin
|
||||
|
@ -101,7 +101,7 @@ class ModalDrawerViewModel(
|
||||
uiState
|
||||
.map { it.searchText }
|
||||
.distinctUntilChanged()
|
||||
.debounce(1000)
|
||||
.debounce(1_000)
|
||||
.onEach {
|
||||
refresh()
|
||||
}.launchIn(this)
|
||||
|
@ -169,7 +169,7 @@ class ExploreViewModel(
|
||||
.map {
|
||||
it.searchText
|
||||
}.distinctUntilChanged()
|
||||
.debounce(1000)
|
||||
.debounce(1_000)
|
||||
.onEach {
|
||||
if (!uiState.value.initial) {
|
||||
emitEffect(ExploreMviModel.Effect.BackToTop)
|
||||
|
@ -77,10 +77,12 @@ class ManageSubscriptionsViewModel(
|
||||
uiState
|
||||
.map { it.searchText }
|
||||
.distinctUntilChanged()
|
||||
.debounce(1000)
|
||||
.debounce(1_000)
|
||||
.onEach {
|
||||
emitEffect(ManageSubscriptionsMviModel.Effect.BackToTop)
|
||||
refresh()
|
||||
if (!uiState.value.initial) {
|
||||
emitEffect(ManageSubscriptionsMviModel.Effect.BackToTop)
|
||||
refresh()
|
||||
}
|
||||
}.launchIn(this)
|
||||
if (uiState.value.communities.isEmpty()) {
|
||||
refresh(initial = true)
|
||||
|
@ -46,7 +46,7 @@ class MultiCommunityEditorViewModel(
|
||||
uiState
|
||||
.map { it.searchText }
|
||||
.distinctUntilChanged()
|
||||
.debounce(1000)
|
||||
.debounce(1_000)
|
||||
.onEach {
|
||||
refresh()
|
||||
}.launchIn(this)
|
||||
|
@ -182,9 +182,11 @@ class PostDetailViewModel(
|
||||
.distinctUntilChanged()
|
||||
.debounce(1_000)
|
||||
.onEach {
|
||||
updateState { it.copy(loading = false) }
|
||||
emitEffect(PostDetailMviModel.Effect.BackToTop)
|
||||
refresh()
|
||||
if (!uiState.value.initial) {
|
||||
updateState { it.copy(loading = false) }
|
||||
emitEffect(PostDetailMviModel.Effect.BackToTop)
|
||||
refresh()
|
||||
}
|
||||
}.launchIn(this)
|
||||
|
||||
identityRepository.isLogged
|
||||
|
@ -36,9 +36,11 @@ class SelectCommunityViewModel(
|
||||
uiState
|
||||
.map { it.searchText }
|
||||
.distinctUntilChanged()
|
||||
.debounce(1000)
|
||||
.debounce(1_000)
|
||||
.onEach {
|
||||
refresh()
|
||||
if (!uiState.value.initial) {
|
||||
refresh()
|
||||
}
|
||||
}.launchIn(this)
|
||||
|
||||
if (uiState.value.initial) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user