File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
workflow-ui/core-android/src/main/java/com/squareup/workflow1/ui/navigation Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -38,13 +38,15 @@ internal class DialogSession(
3838 val was = field
3939 field = value
4040 holder.dialog.window?.takeIf { value != was }?.let { window ->
41- // https://stackoverflow.com/questions/2886407/dealing-with-rapid-tapping-on-buttons
42- // If any motion events were enqueued on the main thread, cancel them.
43- dispatchCancelEvent { window.superDispatchTouchEvent(it) }
44- // When we cancel, have to warn things like RecyclerView that handle streams
45- // of motion events and eventually dispatch input events (click, key pressed, etc.)
46- // based on them.
47- window.peekDecorView()?.cancelPendingInputEvents()
41+ window.peekDecorView()?.let { decorView ->
42+ // https://stackoverflow.com/questions/2886407/dealing-with-rapid-tapping-on-buttons
43+ // If any motion events were enqueued on the main thread, cancel them.
44+ dispatchCancelEvent { window.superDispatchTouchEvent(it) }
45+ // When we cancel, have to warn things like RecyclerView that handle streams
46+ // of motion events and eventually dispatch input events (click, key pressed, etc.)
47+ // based on them.
48+ decorView.cancelPendingInputEvents()
49+ }
4850 }
4951 }
5052
You can’t perform that action at this time.
0 commit comments