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
This commit is contained in:
Valentin Shergin 2018-08-27 07:21:20 -07:00 committed by Facebook Github Bot
parent 71295bcdac
commit 5f8d5e0665
1 changed files with 4 additions and 4 deletions

View File

@ -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