File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
core/common/src/main/kotlin/com/ninecraft/booket/core/common/extensions Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -66,13 +66,17 @@ fun Modifier.preventMultiTouch() = pointerInput(Unit) {
6666 // awaitEachGesture: 한 번의 제스쳐 세션을 추상화
6767 awaitEachGesture {
6868 val first = awaitFirstDown(requireUnconsumed = false )
69- do {
69+
70+ while (true ) {
7071 // 이벤트 전파 초기 단계(PointerEventPass.Initial)에서 하위 컴포저블로 이벤트가 내려가기 전에 가로채 소비한다
7172 val event = awaitPointerEvent(pass = PointerEventPass .Initial )
7273 event.changes.forEach { change ->
73- if (change.id != first.id && change.pressed) change.consume()
74+ if (change.id != first.id && change.pressed) {
75+ change.consume()
76+ }
7477 }
75- // 루프 조건: 첫 포인터가 pressed 상태일 동안만 유지한다 (up이거나 cancel되면 pressed=false로 루프 종료)
76- } while (event.changes.any { it.id == first.id && it.pressed })
78+ // 첫 포인터가 pressed 상태일 동안만 유지한다 (up이거나 cancel되면 pressed=false로 루프 종료)
79+ if (event.changes.none { it.id == first.id && it.pressed }) break
80+ }
7781 }
7882}
You can’t perform that action at this time.
0 commit comments