From 093ff2c7f2fa22fc000a3f6a250d42a8eadf8fc1 Mon Sep 17 00:00:00 2001 From: Rob Orgiu Date: Mon, 18 Nov 2024 15:26:57 +0100 Subject: [PATCH] Simplify Drag&Drop implementation --- .../nowinandroid/core/ui/NewsResourceCard.kt | 21 +++++++------------ gradle/libs.versions.toml | 4 ++-- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/core/ui/src/main/kotlin/com/google/samples/apps/nowinandroid/core/ui/NewsResourceCard.kt b/core/ui/src/main/kotlin/com/google/samples/apps/nowinandroid/core/ui/NewsResourceCard.kt index 2395eb156f..ff10b8d380 100644 --- a/core/ui/src/main/kotlin/com/google/samples/apps/nowinandroid/core/ui/NewsResourceCard.kt +++ b/core/ui/src/main/kotlin/com/google/samples/apps/nowinandroid/core/ui/NewsResourceCard.kt @@ -24,7 +24,6 @@ import androidx.compose.foundation.Canvas import androidx.compose.foundation.ExperimentalFoundationApi import androidx.compose.foundation.Image import androidx.compose.foundation.draganddrop.dragAndDropSource -import androidx.compose.foundation.gestures.detectTapGestures import androidx.compose.foundation.horizontalScroll import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box @@ -140,18 +139,14 @@ fun NewsResourceCardExpanded( modifier = Modifier .fillMaxWidth((.8f)) .dragAndDropSource { - detectTapGestures( - onLongPress = { - startTransfer( - DragAndDropTransferData( - ClipData.newPlainText( - sharingLabel, - sharingContent, - ), - flags = dragAndDropFlags, - ), - ) - }, + startTransfer( + DragAndDropTransferData( + ClipData.newPlainText( + sharingLabel, + sharingContent, + ), + flags = dragAndDropFlags, + ), ) }, ) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b1d9232ee7..61ac0ee05e 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -2,12 +2,12 @@ accompanist = "0.34.0" androidDesugarJdkLibs = "2.0.4" # AGP and tools should be updated together -androidGradlePlugin = "8.6.1" +androidGradlePlugin = "8.7.2" androidTools = "31.7.2" androidxActivity = "1.9.3" androidxAppCompat = "1.7.0" androidxBrowser = "1.8.0" -androidxComposeBom = "2024.09.00" +androidxComposeBom = "2024.11.00" androidxComposeRuntimeTracing = "1.0.0-beta01" androidxCore = "1.13.1" androidxCoreSplashscreen = "1.0.1"