Skip to content

Commit cbe0e6b

Browse files
JoshuaGrossfacebook-github-bot
authored andcommitted
Pass nativeTimestamp into PressabilityPerformanceEvent
Summary: Pass nativeTimestamp into PressabilityPerformanceEvent as a way to uniquely identify events. Changelog: [Internal] Differential Revision: D30648544 fbshipit-source-id: 7cb0146f6ff1655f1312e5094535e59268fb2a22
1 parent 49b3b31 commit cbe0e6b

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

Libraries/Pressability/Pressability.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -631,6 +631,7 @@ export default class Pressability {
631631
PressabilityPerformanceEventEmitter.emitEvent(() => {
632632
return {
633633
signal,
634+
nativeTimestamp: event.nativeEvent.timestamp,
634635
touchDelayMs: Date.now() - event.nativeEvent.timestamp,
635636
};
636637
});

Libraries/Pressability/PressabilityPerformanceEventEmitter.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {type PressabilityTouchSignal as TouchSignal} from './PressabilityTypes.j
1212

1313
export type PressabilityPerformanceEvent = $ReadOnly<{|
1414
signal: TouchSignal,
15+
nativeTimestamp: number,
1516
touchDelayMs: number,
1617
|}>;
1718
export type PressabilityPerformanceEventListener = PressabilityPerformanceEvent => void;

0 commit comments

Comments
 (0)