54 lines
3.4 KiB
TypeScript
54 lines
3.4 KiB
TypeScript
/* Metro module 11920; source: modules/guild_communication_disabled/useCommunicationDisabledCountdownCleanup.tsx; dependencies: [31, 7054, 11921, 2] */
|
|
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 _fun91415(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12106:6, offset: 0x02063a3f, size: 128 bytes, params: 8, frame: 18
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/guild_communication_disabled/useCommunicationDisabledCountdownCleanup.tsx');
|
|
exports.useCommunicationDisabledCountdownCleanup = useCommunicationDisabledCountdownCleanup;
|
|
function useCommunicationDisabledCountdownCleanup(a0) { // fn#91416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12106:289, offset: 0x02063abf, size: 182 bytes, params: 2, frame: 21
|
|
const value = a0;
|
|
const {communicationDisabledUntil, userId, guildId} = value ?? ({});
|
|
const value5 = (importDefault(7054) /* metro dependency 7054: useCountdown */)(communicationDisabledUntil != null ? global.Date.parse(communicationDisabledUntil) : global.Date.now());
|
|
const seconds = value5.seconds;
|
|
const env0_4 = useRef(null);
|
|
useEffect(_fun91417, [guildId, userId, seconds, communicationDisabledUntil, value]);
|
|
return value5;
|
|
function _fun91417() { // fn#91417, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12106:491, offset: 0x02063b75, size: 134 bytes, params: 1, frame: 15
|
|
if (env0_0 == null) {
|
|
global.clearTimeout(env0_4.current);
|
|
} else {
|
|
if (guildId == null) {
|
|
global.clearTimeout(env0_4.current);
|
|
return undefined;
|
|
}
|
|
if (userId != null) {
|
|
if (seconds <= 0 && env0_4.current == null) {
|
|
env0_4.current = global.setTimeout(_fun91418, 1000);
|
|
}
|
|
return _fun91419;
|
|
}
|
|
global.clearTimeout(env0_4.current);
|
|
}
|
|
function _fun91418() { // fn#91418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12106:578, offset: 0x02063bfb, size: 50 bytes, params: 1, frame: 14
|
|
let value = environment.__proto__.__proto__;
|
|
value = importDefault(11921) /* metro dependency 11921: CommunicationDisabledManager */;
|
|
value.clearGuildMemberTimeout(guildId, userId);
|
|
}
|
|
|
|
function _fun91419() { // fn#91419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12106:628, offset: 0x02063c2d, size: 56 bytes, params: 1, frame: 13
|
|
if (env1_4.current != null) {
|
|
global.clearTimeout(env1_4.current);
|
|
env1_4.current = null;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun91415, 11920, [31, 7054, 11921, 2]) /* metro module 11920, dependencies: [31, 7054, 11921, 2] */;
|