From 1f329778ffe18cbeed7e57cd412d502406dd2dd7 Mon Sep 17 00:00:00 2001 From: HeroBrine1st Erquilenne Date: Mon, 22 Jan 2024 19:34:06 +0300 Subject: [PATCH] Fix scroll position restoration regression in 3c4bc61ee918537fe732a91e3f099fda6950c7e0 --- .../java/ru/herobrine1st/paging/internal/PagingItemsImpl.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/ru/herobrine1st/paging/internal/PagingItemsImpl.kt b/app/src/main/java/ru/herobrine1st/paging/internal/PagingItemsImpl.kt index 3787860c..ebf7ae7f 100644 --- a/app/src/main/java/ru/herobrine1st/paging/internal/PagingItemsImpl.kt +++ b/app/src/main/java/ru/herobrine1st/paging/internal/PagingItemsImpl.kt @@ -53,10 +53,10 @@ class PagingItemsImpl( suspend fun collectPagingData(startImmediately: Boolean) { flow.collect { snapshot -> loadStates = snapshot.loadStates + currentGeneration = snapshot.generation if (uiChannel == null) { uiChannel = snapshot.uiChannel pagingConfig = snapshot.pagingConfig - currentGeneration = snapshot.generation if (startImmediately && loadStates.refresh is LoadState.NotLoading) refresh() }