Skip to content

Commit

Permalink
Make handler comparator work only on non-null objects (#2964)
Browse files Browse the repository at this point in the history
## Description

Should close
#2960

Changes the comparator type to work only with non-null objects, since
it's only used in this way. It was probably a leftover from migration to
Kotlin.

## Test plan

Build the app
  • Loading branch information
j-piasecki authored Jun 28, 2024
1 parent b1ed6ff commit 30fd318
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ class GestureHandlerOrchestrator(
private val matrixTransformCoords = FloatArray(2)
private val inverseMatrix = Matrix()
private val tempCoords = FloatArray(2)
private val handlersComparator = Comparator<GestureHandler<*>?> { a, b ->
private val handlersComparator = Comparator<GestureHandler<*>> { a, b ->
return@Comparator if (a.isActive && b.isActive || a.isAwaiting && b.isAwaiting) {
// both A and B are either active or awaiting activation, in which case we prefer one that
// has activated (or turned into "awaiting" state) earlier
Expand Down

0 comments on commit 30fd318

Please sign in to comment.