File tree Expand file tree Collapse file tree 1 file changed +1
-21
lines changed
feature/interests/src/main/java/com/google/samples/apps/nowinandroid/feature/interests Expand file tree Collapse file tree 1 file changed +1
-21
lines changed Original file line number Diff line number Diff line change @@ -42,8 +42,7 @@ fun TopicsTabContent(
4242 LazyColumn (
4343 modifier = modifier
4444 .padding(horizontal = 16 .dp)
45- .testTag(" interests:topics" )
46- .disableSplitMotionEvents(),
45+ .testTag(" interests:topics" ),
4746 contentPadding = PaddingValues (top = 8 .dp)
4847 ) {
4948 topics.forEach { followableTopic ->
@@ -65,22 +64,3 @@ fun TopicsTabContent(
6564 }
6665 }
6766}
68-
69- fun Modifier.disableSplitMotionEvents () =
70- pointerInput(Unit ) {
71- coroutineScope {
72- var currentId: Long = - 1L
73- awaitPointerEventScope {
74- while (true ) {
75- awaitPointerEvent(PointerEventPass .Initial ).changes.forEach { pointerInfo ->
76- when {
77- pointerInfo.pressed && currentId == - 1L -> currentId = pointerInfo.id.value
78- pointerInfo.pressed.not () && currentId == pointerInfo.id.value -> currentId = - 1
79- pointerInfo.id.value != currentId && currentId != - 1L -> pointerInfo.consume()
80- else -> Unit
81- }
82- }
83- }
84- }
85- }
86- }
You can’t perform that action at this time.
0 commit comments