Skip to content

Commit 4d94d15

Browse files
committed
Make PointerData private again
Add comments
1 parent 3205ed4 commit 4d94d15

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

android/lib/src/main/java/com/swmansion/gesturehandler/GestureHandler.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,7 @@ open class GestureHandler<ConcreteGestureHandlerT : GestureHandler<ConcreteGestu
797797
}
798798
}
799799

800-
data class PointerData(
800+
private data class PointerData(
801801
val pointerId: Int,
802802
var x: Float,
803803
var y: Float,

android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerModule.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,10 @@ class RNGestureHandlerModule(reactContext: ReactApplicationContext?) :
433433

434434
override fun setGestureHandlerState(handlerTag: Int, newState: Int) {
435435
registry.getHandler(handlerTag)?.let { handler ->
436+
// Try to initialize the handler in case it was not yet initialized
436437
handler.initialize()
438+
// Try to transition to the BEGIN state (possible only from UNDETERMINED)
439+
// to force the correct event flow
437440
handler.begin()
438441

439442
when (newState) {

0 commit comments

Comments
 (0)