From a8c6ca4156ff8a87e1d998f84f366662aac56707 Mon Sep 17 00:00:00 2001 From: peposdd Date: Sat, 8 Jun 2024 17:14:26 -0700 Subject: [PATCH] [#600] Avoid gesture-related modifier if gestures are disabled --- CHANGELOG.md | 4 +++- .../interactions/composable/AppyxInteractionsContainer.kt | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 17ada0220..e331985ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,9 @@ ## Pending changes -– +### Fixed + +– [#600](https://github.com/bumble-tech/appyx/issues/600) - Fix Parent interaction is gone once it has a child on top ## 2.0.0 diff --git a/appyx-interactions/common/src/commonMain/kotlin/com/bumble/appyx/interactions/composable/AppyxInteractionsContainer.kt b/appyx-interactions/common/src/commonMain/kotlin/com/bumble/appyx/interactions/composable/AppyxInteractionsContainer.kt index c31beeb99..3e3a248ef 100644 --- a/appyx-interactions/common/src/commonMain/kotlin/com/bumble/appyx/interactions/composable/AppyxInteractionsContainer.kt +++ b/appyx-interactions/common/src/commonMain/kotlin/com/bumble/appyx/interactions/composable/AppyxInteractionsContainer.kt @@ -113,11 +113,11 @@ fun AppyxInteractionsContainer( ) ) } - .onPointerEvent { + .then(if (!appyxComponent.isGesturesEnabled) Modifier else Modifier.onPointerEvent { if (it.type == PointerEventType.Release) { appyxComponent.onRelease() } - } + }) ) { CompositionLocalProvider(LocalBoxScope provides this) { elementUiModels.forEach { elementUiModel ->