Skip to content

Commit 2a21d05

Browse files
committed
Adapt uikit code for MouseSelectionObserver changes
1 parent 7160725 commit 2a21d05

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

compose/foundation/foundation/src/uikitMain/kotlin/androidx/compose/foundation/text/modifiers/SelectionController.uikit.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,8 @@ internal actual fun SelectionRegistrar.makeSelectionModifier(
175175

176176
override fun onStart(
177177
downPosition: Offset,
178-
adjustment: SelectionAdjustment
178+
adjustment: SelectionAdjustment,
179+
clickCount: Int,
179180
): Boolean {
180181
layoutCoordinates()?.let {
181182
if (!it.isAttached) return false
@@ -324,7 +325,7 @@ private suspend fun AwaitPointerEventScope.mouseSelection(
324325
else -> SelectionAdjustment.Paragraph
325326
}
326327

327-
val started = observer.onStart(downChange.position, selectionAdjustment)
328+
val started = observer.onStart(downChange.position, selectionAdjustment, clicksCounter.clicks)
328329
if (started) {
329330
val shouldConsumeUp = drag(downChange.id) {
330331
if (observer.onDrag(it.position, selectionAdjustment)) {

0 commit comments

Comments
 (0)