From b70e4be305fef41002f1844301c7dcda29115e99 Mon Sep 17 00:00:00 2001 From: UlrichKu Date: Fri, 24 Mar 2023 16:26:50 +0100 Subject: [PATCH] 3469: Do not jump in the list on the (second) refresh (#3471) --- .../tusky/components/viewthread/ViewThreadFragment.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/keylesspalace/tusky/components/viewthread/ViewThreadFragment.kt b/app/src/main/java/com/keylesspalace/tusky/components/viewthread/ViewThreadFragment.kt index dff918025..cbcedd968 100644 --- a/app/src/main/java/com/keylesspalace/tusky/components/viewthread/ViewThreadFragment.kt +++ b/app/src/main/java/com/keylesspalace/tusky/components/viewthread/ViewThreadFragment.kt @@ -178,7 +178,11 @@ class ViewThreadFragment : threadProgressBar = getProgressBarJob(binding.threadProgressBar, 500) threadProgressBar.start() - adapter.submitList(listOf(uiState.statusViewDatum)) + if (viewModel.isInitialLoad) { + adapter.submitList(listOf(uiState.statusViewDatum)) + + // else this "submit one and then all on success below" will always center on the one + } revealButtonState = uiState.revealButton binding.swipeRefreshLayout.isRefreshing = false