Commit e2de07a
authored
Fix(gestures): Handle pointer events inside awaitPointerEventScope (#590)
The lint tool reported a "ReturnFromAwaitPointerEventScope" warning
in KotlinSnippets.kt.
Returning a value from this scope can lead to dropped input events
due to the way pointer event queues are handled.
This commit resolves the warning by moving the animation logic,
which depends on the tap position, directly inside the
awaitPointerEventScope block.
This ensures that the event data is processed immediately
within the correct context, preventing potential event loss.1 parent 959474f commit e2de07a
File tree
1 file changed
+11
-9
lines changed- compose/snippets/src/main/java/com/example/compose/snippets/kotlin
1 file changed
+11
-9
lines changedLines changed: 11 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
352 | 354 | | |
353 | 355 | | |
354 | 356 | | |
| |||
0 commit comments