coalescingKeys for RCTTouchEvent
Reviewed By: javache Differential Revision: D3092864 fb-gh-sync-id: b703dca92578e05195eac9171b5b6eee83976cc9 fbshipit-source-id: b703dca92578e05195eac9171b5b6eee83976cc9
This commit is contained in:
parent
7c2b397b00
commit
b1b53aad8b
|
@ -39,6 +39,7 @@
|
|||
BOOL _dispatchedInitialTouches;
|
||||
BOOL _recordingInteractionTiming;
|
||||
CFTimeInterval _mostRecentEnqueueJS;
|
||||
uint16_t _coalescingKey;
|
||||
}
|
||||
|
||||
- (instancetype)initWithBridge:(RCTBridge *)bridge
|
||||
|
@ -200,7 +201,7 @@ typedef NS_ENUM(NSInteger, RCTTouchEventType) {
|
|||
RCTTouchEvent *event = [[RCTTouchEvent alloc] initWithEventName:eventName
|
||||
reactTouches:reactTouches
|
||||
changedIndexes:changedIndexes
|
||||
coalescingKey:0];
|
||||
coalescingKey:_coalescingKey];
|
||||
[_eventDispatcher sendEvent:event];
|
||||
}
|
||||
|
||||
|
@ -233,6 +234,7 @@ static BOOL RCTAnyTouchesChanged(NSSet<UITouch *> *touches)
|
|||
{
|
||||
// If gesture just recognized, send all touches to JS as if they just began.
|
||||
if (self.state == UIGestureRecognizerStateBegan) {
|
||||
_coalescingKey++;
|
||||
[self _updateAndDispatchTouches:_nativeTouches.set eventName:@"topTouchStart" originatingTime:0];
|
||||
|
||||
// We store this flag separately from `state` because after a gesture is
|
||||
|
|
Loading…
Reference in New Issue