67 lines
3.6 KiB
TypeScript
67 lines
3.6 KiB
TypeScript
/* Metro module 15518; source: modules/game_console/native/useShouldDisplayCancelConsoleTransfer.tsx; dependencies: [57, 31, 2] */
|
|
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
|
|
function _fun118836(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15715:6, offset: 0x024f0e0e, size: 136 bytes, params: 8, frame: 17
|
|
const shouldDisplayCancel = function(a0) {
|
|
var r0;
|
|
var value = a0 != null;
|
|
if (value) {
|
|
value = global.Date.now();
|
|
value = value - a0.startedAt > 6000;
|
|
r0 = value;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
};
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/game_console/native/useShouldDisplayCancelConsoleTransfer.tsx');
|
|
exports.default = useShouldDisplayCancelConsoleTransfer;
|
|
function useShouldDisplayCancelConsoleTransfer(a0) { // fn#118838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15715:304, offset: 0x024f0ec9, size: 93 bytes, params: 2, frame: 16
|
|
const env0_0 = a0;
|
|
const binding = env0_1;
|
|
const value = env0_0(binding.useState(_fun118839), 2);
|
|
const property = value[0];
|
|
var env0_1 = value[1];
|
|
binding.useEffect(_fun118840, [a0]);
|
|
return property;
|
|
function _fun118839() { // fn#118839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15715:372, offset: 0x016f88b2, size: 23 bytes, params: 1, frame: 11
|
|
return shouldDisplayCancel(env0_0);
|
|
}
|
|
|
|
function _fun118840() { // fn#118840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15715:444, offset: 0x024f0f26, size: 116 bytes, params: 1, frame: 15
|
|
var environment;
|
|
const value = environment.__proto__;
|
|
const shouldDisplayCancelBinding = shouldDisplayCancel;
|
|
const binding = env0_0Binding;
|
|
const shouldDisplayCancel2 = shouldDisplayCancelBinding(binding);
|
|
env0_1(shouldDisplayCancel2);
|
|
if (binding == null) {
|
|
return undefined;
|
|
}
|
|
if (shouldDisplayCancel2) {
|
|
return undefined;
|
|
}
|
|
const setTimeout = global.setTimeout;
|
|
const Date = global.Date;
|
|
var env0_0Binding = setTimeout(_fun118841, 6000 - (Date.now() - env0_0.startedAt));
|
|
return _fun118842;
|
|
function _fun118841() { // fn#118841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15715:517, offset: 0x024f0f9a, size: 32 bytes, params: 1, frame: 12
|
|
return env1_1(shouldDisplayCancel(env1_0));
|
|
}
|
|
|
|
function _fun118842() { // fn#118842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15715:584, offset: 0x00e59c84, size: 24 bytes, params: 1, frame: 11
|
|
global.clearTimeout(env0_0);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun118836, 15518, [57, 31, 2]) /* metro module 15518, dependencies: [57, 31, 2] */;
|