@@ -18,7 +18,11 @@ import IGestureHandler from './IGestureHandler';
18
18
import { MouseButton } from '../../handlers/gestureHandlerCommon' ;
19
19
import { PointerType } from '../../PointerType' ;
20
20
import { GestureHandlerDelegate } from '../tools/GestureHandlerDelegate' ;
21
- import { ActionType } from '../../ActionType' ;
21
+ import {
22
+ ActionType ,
23
+ isAnimatedActionType ,
24
+ isNativeDetectorActionType ,
25
+ } from '../../ActionType' ;
22
26
import { tagMessage } from '../../utils' ;
23
27
24
28
export default abstract class GestureHandler implements IGestureHandler {
@@ -369,8 +373,7 @@ export default abstract class GestureHandler implements IGestureHandler {
369
373
if ( touchEvent ) {
370
374
if (
371
375
onGestureHandlerTouchEvent &&
372
- ( this . actionType === ActionType . NATIVE_DETECTOR ||
373
- this . actionType === ActionType . NATIVE_DETECTOR_ANIMATED_EVENT )
376
+ isNativeDetectorActionType ( this . actionType )
374
377
) {
375
378
invokeNullableMethod ( onGestureHandlerTouchEvent , touchEvent ) ;
376
379
}
@@ -411,8 +414,7 @@ export default abstract class GestureHandler implements IGestureHandler {
411
414
resultEvent . nativeEvent . oldState = undefined ;
412
415
if (
413
416
onGestureHandlerAnimatedEvent &&
414
- ( this . actionType === ActionType . NATIVE_ANIMATED_EVENT ||
415
- this . actionType === ActionType . NATIVE_DETECTOR_ANIMATED_EVENT )
417
+ isAnimatedActionType ( this . actionType )
416
418
) {
417
419
invokeNullableMethod ( onGestureHandlerAnimatedEvent , resultEvent ) ;
418
420
}
0 commit comments