From 7b8a12e3eb8c5be1f6b85cd00c52a54ee2681183 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 7 May 2024 03:49:33 +0000 Subject: [PATCH] Update dependency sh.calvin.reorderable:reorderable to v2.0.3 (#1143) * Update dependency sh.calvin.reorderable:reorderable to v2.0.3 * Address deprecation --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com> --- .../kotlin/com/hippo/ehviewer/ui/screen/DownloadsScreen.kt | 4 ++-- .../kotlin/com/hippo/ehviewer/ui/screen/GalleryListScreen.kt | 4 ++-- gradle/libs.versions.toml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/kotlin/com/hippo/ehviewer/ui/screen/DownloadsScreen.kt b/app/src/main/kotlin/com/hippo/ehviewer/ui/screen/DownloadsScreen.kt index d31e69ba9..9268ef88d 100644 --- a/app/src/main/kotlin/com/hippo/ehviewer/ui/screen/DownloadsScreen.kt +++ b/app/src/main/kotlin/com/hippo/ehviewer/ui/screen/DownloadsScreen.kt @@ -129,7 +129,7 @@ import kotlinx.coroutines.delay import kotlinx.coroutines.launch import moe.tarsin.coroutines.onEachLatest import sh.calvin.reorderable.ReorderableItem -import sh.calvin.reorderable.rememberReorderableLazyColumnState +import sh.calvin.reorderable.rememberReorderableLazyListState @Destination @Composable @@ -293,7 +293,7 @@ fun DownloadsScreen(navigator: DestinationsNavigator) = composing(navigator) { val labelsListState = rememberLazyListState() val editEnable = DownloadsFilterMode.CUSTOM == filterMode - val reorderableLabelState = rememberReorderableLazyColumnState(labelsListState) { from, to -> + val reorderableLabelState = rememberReorderableLazyListState(labelsListState) { from, to -> val fromPosition = from.index - 2 val toPosition = to.index - 2 DownloadManager.labelList.apply { add(toPosition, removeAt(fromPosition)) } diff --git a/app/src/main/kotlin/com/hippo/ehviewer/ui/screen/GalleryListScreen.kt b/app/src/main/kotlin/com/hippo/ehviewer/ui/screen/GalleryListScreen.kt index d5f34fd90..33ed5f23f 100644 --- a/app/src/main/kotlin/com/hippo/ehviewer/ui/screen/GalleryListScreen.kt +++ b/app/src/main/kotlin/com/hippo/ehviewer/ui/screen/GalleryListScreen.kt @@ -148,7 +148,7 @@ import kotlinx.coroutines.launch import moe.tarsin.coroutines.onEachLatest import moe.tarsin.coroutines.runSuspendCatching import sh.calvin.reorderable.ReorderableItem -import sh.calvin.reorderable.rememberReorderableLazyColumnState +import sh.calvin.reorderable.rememberReorderableLazyListState @Destination @Composable @@ -366,7 +366,7 @@ fun GalleryListScreen(lub: ListUrlBuilder, navigator: DestinationsNavigator) = c val view = LocalView.current Box(modifier = Modifier.fillMaxSize()) { val quickSearchListState = rememberLazyListState() - val reorderableLazyListState = rememberReorderableLazyColumnState(quickSearchListState) { from, to -> + val reorderableLazyListState = rememberReorderableLazyListState(quickSearchListState) { from, to -> val fromIndex = from.index - 1 val toIndex = to.index - 1 quickSearchList.apply { add(toIndex, removeAt(fromIndex)) } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index d1c5ded17..47c4998bc 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -97,7 +97,7 @@ okio-jvm = { module = "com.squareup.okio:okio-jvm", version.ref = "okio" } photoview = "com.github.chrisbanes:PhotoView:2.3.0" -reorderable = "sh.calvin.reorderable:reorderable:2.0.1" +reorderable = "sh.calvin.reorderable:reorderable:2.0.3" serialization-cbor = { module = "org.jetbrains.kotlinx:kotlinx-serialization-cbor", version.ref = "kotlinx-serialization" } serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinx-serialization" }