decord/source/modules/tti_analytics/native/TTIFirstContentfulPaint.tsx

35 lines
1.3 KiB
TypeScript
Raw Normal View History

// Module ID: 11927
// Function ID: 11928
2026-07-20 16:05:17 +00:00
// Name: TTIFirstContentfulPaint
// Dependencies: [19, 21, 4432, 9, 7681, 11928, 2]
2026-07-20 16:05:17 +00:00
// Exports: TTIFirstContentfulPaint
// Module 11927 (TTIFirstContentfulPaint)
import TTITrackerDefault from "TTITracker" /* 9 */;
import RootNavigationRef from "RootNavigationRef" /* 4432 */;
import PostTTIScheduler from "PostTTIScheduler" /* 7681 */;
import noop from "module_19" /* 19 */;
2026-07-23 10:11:24 +00:00
require = fn;
const jsx = fn(21).jsx;
const size = fn(2);
const result = size.fileFinishedImporting("modules/tti_analytics/native/TTIFirstContentfulPaint.tsx");
2026-07-20 16:05:17 +00:00
export const TTIFirstContentfulPaint = function TTIFirstContentfulPaint(checkFocusedScreen) {
checkFocusedScreen = checkFocusedScreen.checkFocusedScreen;
const items = [checkFocusedScreen];
const onMeasurement = noop.useCallback((nativeEvent) => {
2026-07-20 16:05:17 +00:00
if (null != checkFocusedScreen) {
const rootNavigationRef = RootNavigationRef.getRootNavigationRef();
2026-07-20 16:05:17 +00:00
let currentRoute;
2026-07-29 08:29:29 +00:00
if (rootNavigationRef != null) {
2026-07-20 16:05:17 +00:00
currentRoute = rootNavigationRef.getCurrentRoute();
}
}
const firstContentfulPaint = TTITrackerDefault.firstContentfulPaint;
2026-07-20 16:05:17 +00:00
firstContentfulPaint.record(nativeEvent.nativeEvent.timestamp);
PostTTIScheduler.notifyAboutTTI();
2026-07-20 16:05:17 +00:00
}, items);
return jsx(checkFocusedScreen(11928).TTIMeasurementView, { onMeasurement });
2026-07-20 16:05:17 +00:00
};