From c7470aade749f152661513eadf1be39f23217795 Mon Sep 17 00:00:00 2001 From: Arkadii Ivanov Date: Mon, 18 Dec 2023 10:23:49 +0000 Subject: [PATCH] Revert "Fixed the issue of 'HorizontalPager' slow scrolling and 'onPageSelected' not being called." --- .../decompose/extensions/compose/jetbrains/pages/Pages.kt | 2 +- .../decompose/extensions/compose/jetpack/pages/Pages.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions-compose-jetbrains/src/commonMain/kotlin/com/arkivanov/decompose/extensions/compose/jetbrains/pages/Pages.kt b/extensions-compose-jetbrains/src/commonMain/kotlin/com/arkivanov/decompose/extensions/compose/jetbrains/pages/Pages.kt index ef0c31d70..1d71213a0 100644 --- a/extensions-compose-jetbrains/src/commonMain/kotlin/com/arkivanov/decompose/extensions/compose/jetbrains/pages/Pages.kt +++ b/extensions-compose-jetbrains/src/commonMain/kotlin/com/arkivanov/decompose/extensions/compose/jetbrains/pages/Pages.kt @@ -81,7 +81,7 @@ fun Pages( } } - DisposableEffect(state.currentPage, state.targetPage) { + DisposableEffect(state.currentPage) { if (state.currentPage == state.targetPage) { onPageSelected(state.currentPage) } diff --git a/extensions-compose-jetpack/src/main/java/com/arkivanov/decompose/extensions/compose/jetpack/pages/Pages.kt b/extensions-compose-jetpack/src/main/java/com/arkivanov/decompose/extensions/compose/jetpack/pages/Pages.kt index 9305ca8bf..48d9ad2bd 100644 --- a/extensions-compose-jetpack/src/main/java/com/arkivanov/decompose/extensions/compose/jetpack/pages/Pages.kt +++ b/extensions-compose-jetpack/src/main/java/com/arkivanov/decompose/extensions/compose/jetpack/pages/Pages.kt @@ -81,7 +81,7 @@ fun Pages( } } - DisposableEffect(state.currentPage, state.targetPage) { + DisposableEffect(state.currentPage) { if (state.currentPage == state.targetPage) { onPageSelected(state.currentPage) }