From 16966e78701a94353b41b498366a6a986aa3f4d2 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Thu, 28 Nov 2024 21:28:50 -0800 Subject: [PATCH] trivial cleanup --- .../com/mohamedrejeb/richeditor/ui/handleInteractions.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/richeditor-compose/src/commonMain/kotlin/com/mohamedrejeb/richeditor/ui/handleInteractions.kt b/richeditor-compose/src/commonMain/kotlin/com/mohamedrejeb/richeditor/ui/handleInteractions.kt index 906e758c..4e177190 100644 --- a/richeditor-compose/src/commonMain/kotlin/com/mohamedrejeb/richeditor/ui/handleInteractions.kt +++ b/richeditor-compose/src/commonMain/kotlin/com/mohamedrejeb/richeditor/ui/handleInteractions.kt @@ -27,13 +27,14 @@ internal fun Modifier.handleInteractions( if (!enabled) continue if (event.type == PointerEventType.Press) { - val position = event.changes.first().position + val eventChange = event.changes.first() + val position = eventChange.position - when (event.changes.first().type) { + when (eventChange.type) { PointerType.Touch -> { onInteraction?.invoke( InteractionType.Tap, - event.changes.first().position + eventChange.position ) }