You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8dd560f
Browse filesBrowse the repository at this point in the historyBrowse files
## Description
This PR renames `logicDetector` to `virtualDetector`. It also resolves
the issue of android setters relying on the order they are executed in.
## Test plan
`yarn lint-js`
Copy file name to clipboardExpand all lines: packages/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandler.kt
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -33,17 +33,17 @@ open class GestureHandler {
33
33
private set
34
34
35
35
// Host detector view is a reference to a Native Detector designated to handle events from a
36
-
//Logic Detector to which the gesture is assigned.
36
+
//Virtual Detector to which the gesture is assigned.
37
37
var hostDetectorView:RNGestureHandlerDetectorView?=null
38
38
39
39
val viewForEvents:RNGestureHandlerDetectorView
40
40
get() {
41
-
assert(usesNativeOrLogicDetector(actionType)) {
41
+
assert(usesNativeOrVirtualDetector(actionType)) {
42
42
"[react-native-gesture-handler] `viewForEvents` can only be used with NativeDetector."
Copy file name to clipboardExpand all lines: packages/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerDetectorView.kt
+43-30Lines changed: 43 additions & 30 deletions
Original file line number
Diff line number
Diff line change
@@ -13,12 +13,13 @@ class RNGestureHandlerDetectorView(context: Context) : ReactViewGroup(context) {
Copy file name to clipboardExpand all lines: packages/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerDetectorViewManager.kt
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -37,8 +37,8 @@ class RNGestureHandlerDetectorViewManager :
Copy file name to clipboardExpand all lines: packages/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/events/RNGestureHandlerEvent.kt
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ class RNGestureHandlerEvent private constructor() : Event<RNGestureHandlerEvent>
20
20
dataBuilder:GestureHandlerEventDataBuilder<T>,
21
21
eventHandlerType:EventHandlerType,
22
22
) {
23
-
val view =if (GestureHandler.usesNativeOrLogicDetector(handler.actionType)) {
23
+
val view =if (GestureHandler.usesNativeOrVirtualDetector(handler.actionType)) {
24
24
handler.viewForEvents
25
25
} else {
26
26
handler.view!!
@@ -39,7 +39,7 @@ class RNGestureHandlerEvent private constructor() : Event<RNGestureHandlerEvent>
Copy file name to clipboardExpand all lines: packages/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/events/RNGestureHandlerEventDispatcher.kt
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -71,7 +71,7 @@ class RNGestureHandlerEventDispatcher(private val reactApplicationContext: React
Copy file name to clipboardExpand all lines: packages/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/events/RNGestureHandlerStateChangeEvent.kt
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ class RNGestureHandlerStateChangeEvent private constructor() : Event<RNGestureHa
23
23
dataBuilder:GestureHandlerEventDataBuilder<T>,
24
24
eventHandlerType:EventHandlerType,
25
25
) {
26
-
val view =if (GestureHandler.usesNativeOrLogicDetector(handler.actionType)) {
26
+
val view =if (GestureHandler.usesNativeOrVirtualDetector(handler.actionType)) {
27
27
handler.viewForEvents
28
28
} else {
29
29
handler.view!!
@@ -45,7 +45,7 @@ class RNGestureHandlerStateChangeEvent private constructor() : Event<RNGestureHa
Copy file name to clipboardExpand all lines: packages/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/events/RNGestureHandlerTouchEvent.kt
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ class RNGestureHandlerTouchEvent private constructor() : Event<RNGestureHandlerT
0 commit comments