decord/source/modules/icymi/useICYMIEmptyLoadingAnalytics.tsx

51 lines
1.7 KiB
TypeScript
Raw Normal View History

// Module ID: 16571
// Function ID: 16572
2026-07-20 16:05:17 +00:00
// Name: useICYMIEmptyLoadingAnalytics
// Dependencies: [19, 8424, 2]
2026-07-20 16:05:17 +00:00
// Exports: useICYMIEmptyLoadingAnalytics
// Module 16571 (useICYMIEmptyLoadingAnalytics)
import ICYMIAnalytics3 from "ICYMIAnalytics" /* 8424 */;
import noop from "module_19" /* 19 */;
2026-07-23 10:11:24 +00:00
require = fn;
const size = fn(2);
let result = size.fileFinishedImporting("modules/icymi/useICYMIEmptyLoadingAnalytics.tsx");
2026-07-20 16:05:17 +00:00
export const useICYMIEmptyLoadingAnalytics = function useICYMIEmptyLoadingAnalytics(loading, isFocused) {
2026-08-24 06:08:38 +00:00
closure_0 = loading;
closure_1 = isFocused;
noop = noop.useRef(null);
2026-07-20 16:05:17 +00:00
const items = [loading, isFocused];
const effect = noop.useEffect(() => {
if (closure_1) {
if (closure_0) {
2026-07-20 16:05:17 +00:00
const _Date = Date;
tmp2.current = Date.now();
const ICYMIAnalytics = ICYMIAnalytics3.ICYMIAnalytics;
2026-07-20 16:05:17 +00:00
const result = ICYMIAnalytics.trackFeedEmptyLoadingSeen();
} else if (null != tmp2.current) {
const _Date2 = Date;
2026-07-29 08:29:29 +00:00
const diff = Date.now() - tmp2.current;
const ICYMIAnalytics2 = ICYMIAnalytics3.ICYMIAnalytics;
const obj = { dwellTimeMs: diff };
2026-07-20 16:05:17 +00:00
const result1 = ICYMIAnalytics2.trackFeedEmptyLoadingComplete(obj);
2026-07-29 08:29:29 +00:00
tmp2.current = null;
2026-07-20 16:05:17 +00:00
}
}
}, items);
const items1 = [isFocused];
const effect1 = noop.useEffect(() => {
if (!closure_1) {
2026-07-20 16:05:17 +00:00
if (null != ref.current) {
const _Date = Date;
2026-07-29 08:29:29 +00:00
const diff = Date.now() - tmp.current;
const ICYMIAnalytics = ICYMIAnalytics3.ICYMIAnalytics;
const obj = { dwellTimeMs: diff };
2026-07-20 16:05:17 +00:00
const result = ICYMIAnalytics.trackFeedEmptyLoadingAbandoned(obj);
2026-07-29 08:29:29 +00:00
tmp.current = null;
2026-07-20 16:05:17 +00:00
}
}
}, items1);
};