From 3c29cfa3bf6b1bea77f4b2182c57249335c5f8bd Mon Sep 17 00:00:00 2001 From: ashishch432 Date: Mon, 1 Jun 2026 17:05:18 +0000 Subject: [PATCH] Fix folder list scroll during link fetching --- .../unchained/folderlist/view/FolderListFragment.kt | 10 +--------- .../folderlist/viewmodel/FolderListViewModel.kt | 2 +- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/app/app/src/main/java/com/github/livingwithhippos/unchained/folderlist/view/FolderListFragment.kt b/app/app/src/main/java/com/github/livingwithhippos/unchained/folderlist/view/FolderListFragment.kt index a33e68c5..32719e32 100644 --- a/app/app/src/main/java/com/github/livingwithhippos/unchained/folderlist/view/FolderListFragment.kt +++ b/app/app/src/main/java/com/github/livingwithhippos/unchained/folderlist/view/FolderListFragment.kt @@ -236,15 +236,7 @@ class FolderListFragment : UnchainedFragment(), DownloadListListener { // observe the list loading status viewModel.folderLiveData.observe(viewLifecycleOwner) { - it.getContentIfNotHandled()?.let { _ -> - updateList(adapter) - // scroll only if the results are still coming in - if (viewModel.getScrollingAllowed()) { - lifecycleScope.launch { - binding.rvFolderList.delayedScrolling(requireContext(), delay = 500) - } - } - } + it.getContentIfNotHandled()?.let { _ -> updateList(adapter) } } // observe errors diff --git a/app/app/src/main/java/com/github/livingwithhippos/unchained/folderlist/viewmodel/FolderListViewModel.kt b/app/app/src/main/java/com/github/livingwithhippos/unchained/folderlist/viewmodel/FolderListViewModel.kt index d2e45395..0e1721bf 100644 --- a/app/app/src/main/java/com/github/livingwithhippos/unchained/folderlist/viewmodel/FolderListViewModel.kt +++ b/app/app/src/main/java/com/github/livingwithhippos/unchained/folderlist/viewmodel/FolderListViewModel.kt @@ -74,7 +74,7 @@ constructor( } is EitherResult.Success -> { hitList.add(file.success) - folderLiveData.postEvent(hitList) + folderLiveData.postEvent(hitList.toList()) setRetrievedLinks(hitList.size) progressLiveData.postValue((index + 1) * 100 / links.size) }