From 5f8d5e0665f1d6db9126887d700dfd0f0094deb3 Mon Sep 17 00:00:00 2001 From: Valentin Shergin Date: Mon, 27 Aug 2018 07:21:20 -0700 Subject: [PATCH] Fabric: Proper events priorities for touch events Summary: @public The existing code does not use that at all but we need that for testing things and we will need this in the future. Reviewed By: mdvacca Differential Revision: D8886236 fbshipit-source-id: 5ca33e4f4d4ca13a6be0f55cc04b59d5f9b27fa9 --- ReactCommon/fabric/components/view/ViewEventEmitter.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ReactCommon/fabric/components/view/ViewEventEmitter.cpp b/ReactCommon/fabric/components/view/ViewEventEmitter.cpp index 643b0b017..2bc665412 100644 --- a/ReactCommon/fabric/components/view/ViewEventEmitter.cpp +++ b/ReactCommon/fabric/components/view/ViewEventEmitter.cpp @@ -72,19 +72,19 @@ static folly::dynamic touchEventPayload(const TouchEvent &event) { } void ViewEventEmitter::onTouchStart(const TouchEvent &event) const { - dispatchEvent("touchStart", touchEventPayload(event)); + dispatchEvent("touchStart", touchEventPayload(event), EventPriority::SynchronousUnbatched); } void ViewEventEmitter::onTouchMove(const TouchEvent &event) const { - dispatchEvent("touchMove", touchEventPayload(event)); + dispatchEvent("touchMove", touchEventPayload(event), EventPriority::SynchronousBatched); } void ViewEventEmitter::onTouchEnd(const TouchEvent &event) const { - dispatchEvent("touchEnd", touchEventPayload(event)); + dispatchEvent("touchEnd", touchEventPayload(event), EventPriority::SynchronousBatched); } void ViewEventEmitter::onTouchCancel(const TouchEvent &event) const { - dispatchEvent("touchCancel", touchEventPayload(event)); + dispatchEvent("touchCancel", touchEventPayload(event), EventPriority::SynchronousBatched); } } // namespace react