Skip to content

Commit

Permalink
no crash, removed debug println
Browse files Browse the repository at this point in the history
  • Loading branch information
mazunin-v-jb committed Jan 25, 2024
1 parent 973463d commit 1e84a5a
Showing 1 changed file with 0 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ internal actual fun SelectionRegistrar.makeSelectionModifier(
selectableId: Long,
layoutCoordinates: () -> LayoutCoordinates?
): Modifier {
println("1")
val longPressDragObserver = object : CupertinoTextDragObserver {
/**
* The beginning position of the drag gesture. Every time a new drag gesture starts, it wil be
Expand Down Expand Up @@ -232,15 +231,12 @@ private fun Modifier.selectionGestureInput(
textDragObserver: CupertinoTextDragObserver,
): Modifier = composed {
// TODO(https://youtrack.jetbrains.com/issue/COMPOSE-79) how we can rewrite this without `composed`?
println("2")
val currentMouseSelectionObserver by rememberUpdatedState(mouseSelectionObserver)
val currentTextDragObserver by rememberUpdatedState(textDragObserver)
this.pointerInput(Unit) {
println("3")
val clicksCounter = ClicksCounter(viewConfiguration, clicksSlop = 50.dp.toPx())
awaitEachGesture {
val down = awaitDown()
println("4")
if (
down.isPrecisePointer &&
down.buttons.isPrimaryPressed &&
Expand All @@ -260,7 +256,6 @@ private suspend fun AwaitPointerEventScope.touchSelection(
down: PointerEvent
) {
try {
println("5")
val firstDown = down.changes.first()
val drag = awaitLongPressOrCancellation(firstDown.id)
clicksCounter.update(firstDown)
Expand Down

0 comments on commit 1e84a5a

Please sign in to comment.