decord/source/modules/game_console/native/useShouldDisplayCancelConsoleTransfer.tsx

42 lines
1.2 KiB
TypeScript
Raw Normal View History

2026-07-27 11:26:19 +00:00
// Module ID: 15922
// Function ID: 123066
2026-07-20 16:05:17 +00:00
// Name: shouldDisplayCancel
2026-07-23 10:11:24 +00:00
// Dependencies: [57, 31, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-07-27 11:26:19 +00:00
// Module 15922 (shouldDisplayCancel)
2026-07-23 10:11:24 +00:00
import _slicedToArray from "_slicedToArray";
import result from "result";
2026-07-20 16:05:17 +00:00
function shouldDisplayCancel(startedAt) {
let tmp = null != startedAt;
if (tmp) {
const _Date = Date;
tmp = Date.now() - startedAt.startedAt > 6000;
}
return tmp;
}
2026-07-23 10:11:24 +00:00
const result = require("set").fileFinishedImporting("modules/game_console/native/useShouldDisplayCancelConsoleTransfer.tsx");
2026-07-20 16:05:17 +00:00
export default function useShouldDisplayCancelConsoleTransfer(arg0) {
const callback = arg0;
2026-07-23 10:11:24 +00:00
let tmp = callback(React.useState(() => outer1_2(_slicedToArray)), 2);
React = tmp[1];
2026-07-20 16:05:17 +00:00
const items = [arg0];
const effect = React.useEffect(() => {
2026-07-23 10:11:24 +00:00
const tmp = outer1_2(startedAt);
2026-07-20 16:05:17 +00:00
callback(tmp);
if (null != startedAt) {
if (!tmp) {
const _setTimeout = setTimeout;
const _Date = Date;
2026-07-23 10:11:24 +00:00
startedAt = setTimeout(() => outer1_1(outer2_2(_slicedToArray)), 6000 - (Date.now() - startedAt.startedAt));
2026-07-20 16:05:17 +00:00
return () => {
2026-07-23 10:11:24 +00:00
clearTimeout(_slicedToArray);
2026-07-20 16:05:17 +00:00
};
}
}
}, items);
return tmp[0];
};