-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Logic Detector #3689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next
Are you sure you want to change the base?
Logic Detector #3689
Changes from all commits
7d9de2e
4ccf49e
69e1c5d
9959d8b
1f1f681
a982767
81bf405
a90b83c
8c03f58
a3256d4
6f45a33
66390ab
1ef1969
3379714
e9795cc
7fb8ea9
5c24151
593c44f
fe1d67d
b147c7b
4e718b3
8e9d2dc
97b7369
8b6df8c
dab9e5f
089bbf2
5fbe993
ddce1fb
50c1af4
5f3f1eb
1f22ef4
3e7bc43
cd4d158
164c4e8
84bdf3d
4365e3e
33fe818
6c42eae
a11b6d3
a70f868
c0c9bb0
a2ee13d
f0f24b8
f0fb458
5e5e917
abcac98
5c367b5
b1d620a
157d87b
a1b94d5
75f218b
344617a
03b37c7
9420ead
06bb0e1
474e301
1fef44a
cb9ab7a
76fd9ff
2a727cb
e6fbdba
6fa67e3
31fad02
c9ffbdb
f00e0dd
72e7813
79f1d96
86ff725
7213108
8015ea5
e589043
57b6b57
a8fa637
468e23f
63d44f7
0b362be
20038b1
f3f985c
832a039
1d96fa1
590a5cd
f25cd9e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,8 +26,8 @@ class RNGestureHandlerEvent private constructor() : Event<RNGestureHandlerEvent> | |
dataBuilder: GestureHandlerEventDataBuilder<T>, | ||
eventHandlerType: EventHandlerType, | ||
) { | ||
val view = if (handler.actionType == GestureHandler.ACTION_TYPE_NATIVE_DETECTOR) { | ||
handler.viewForEvents!! | ||
val view = if (GestureHandler.usesNativeOrLogicDetector(handler.actionType)) { | ||
handler.viewForEvents | ||
} else { | ||
handler.view!! | ||
} | ||
|
@@ -45,7 +45,7 @@ class RNGestureHandlerEvent private constructor() : Event<RNGestureHandlerEvent> | |
EVENTS_POOL.release(this) | ||
} | ||
|
||
override fun getEventName() = if (actionType == GestureHandler.ACTION_TYPE_NATIVE_DETECTOR) { | ||
override fun getEventName() = if (GestureHandler.usesNativeOrLogicDetector(actionType)) { | ||
if (eventHandlerType == EventHandlerType.ForAnimated) { | ||
NATIVE_DETECTOR_ANIMATED_EVENT_NAME | ||
} else if (eventHandlerType == EventHandlerType.ForReanimated) { | ||
|
@@ -64,7 +64,7 @@ class RNGestureHandlerEvent private constructor() : Event<RNGestureHandlerEvent> | |
|
||
override fun getCoalescingKey() = coalescingKey | ||
|
||
override fun getEventData(): WritableMap = if (actionType == GestureHandler.ACTION_TYPE_NATIVE_DETECTOR) { | ||
override fun getEventData(): WritableMap = if (GestureHandler.usesNativeOrLogicDetector(actionType)) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know this is not exact place, but shouldn't we also update There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also I'm not sure about |
||
createNativeEventData(dataBuilder!!) | ||
} else { | ||
createEventData(dataBuilder!!) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,7 +71,7 @@ class RNGestureHandlerEventDispatcher(private val reactApplicationContext: React | |
RNGestureHandlerEvent.createEventData(handlerFactory.createEventBuilder(handler)) | ||
sendEventForDeviceEvent(RNGestureHandlerEvent.EVENT_NAME, data) | ||
} | ||
GestureHandler.ACTION_TYPE_NATIVE_DETECTOR -> { | ||
GestureHandler.ACTION_TYPE_NATIVE_DETECTOR, GestureHandler.ACTION_TYPE_LOGIC_DETECTOR -> { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. isV3Api? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a when case, so we would have to use sth like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, yeah. That would work in |
||
val eventHandlerType = if (handler.dispatchesAnimatedEvents) { | ||
EventHandlerType.ForAnimated | ||
} else if (handler.dispatchesReanimatedEvents) { | ||
|
@@ -87,7 +87,7 @@ class RNGestureHandlerEventDispatcher(private val reactApplicationContext: React | |
eventHandlerType, | ||
) | ||
|
||
handler.viewForEvents!!.dispatchEvent(event) | ||
handler.viewForEvents.dispatchEvent(event) | ||
} | ||
} | ||
} | ||
|
@@ -136,7 +136,7 @@ class RNGestureHandlerEventDispatcher(private val reactApplicationContext: React | |
sendEventForDeviceEvent(RNGestureHandlerStateChangeEvent.EVENT_NAME, data) | ||
} | ||
|
||
GestureHandler.ACTION_TYPE_NATIVE_DETECTOR -> { | ||
GestureHandler.ACTION_TYPE_NATIVE_DETECTOR, GestureHandler.ACTION_TYPE_LOGIC_DETECTOR -> { | ||
j-piasecki marked this conversation as resolved.
Show resolved
Hide resolved
|
||
val eventHandlerType = if (handler.dispatchesReanimatedEvents) { | ||
EventHandlerType.ForReanimated | ||
} else { | ||
|
@@ -152,7 +152,7 @@ class RNGestureHandlerEventDispatcher(private val reactApplicationContext: React | |
eventHandlerType, | ||
) | ||
|
||
handler.viewForEvents!!.dispatchEvent(event) | ||
handler.viewForEvents.dispatchEvent(event) | ||
} | ||
} | ||
} | ||
|
@@ -188,15 +188,15 @@ class RNGestureHandlerEventDispatcher(private val reactApplicationContext: React | |
val data = RNGestureHandlerTouchEvent.createEventData(handler) | ||
sendEventForDeviceEvent(RNGestureHandlerEvent.EVENT_NAME, data) | ||
} | ||
GestureHandler.ACTION_TYPE_NATIVE_DETECTOR -> { | ||
GestureHandler.ACTION_TYPE_NATIVE_DETECTOR, GestureHandler.ACTION_TYPE_LOGIC_DETECTOR -> { | ||
j-piasecki marked this conversation as resolved.
Show resolved
Hide resolved
|
||
val eventHandlerType = if (handler.dispatchesReanimatedEvents) { | ||
EventHandlerType.ForReanimated | ||
} else { | ||
EventHandlerType.ForJS | ||
} | ||
val event = RNGestureHandlerTouchEvent.obtain(handler, handler.actionType, eventHandlerType) | ||
|
||
handler.viewForEvents!!.dispatchEvent(event) | ||
handler.viewForEvents.dispatchEvent(event) | ||
} | ||
} | ||
} | ||
|
Uh oh!
There was an error while loading. Please reload this page.