decord/source/modules/activities/utils/useTransitionToConnectedActivityInVoice.tsx

146 lines
5.2 KiB
TypeScript
Raw Normal View History

2026-08-15 05:55:55 +00:00
// Module ID: 16272
// Function ID: 16273
2026-07-20 16:05:17 +00:00
// Name: useTransitionToConnectedActivityInVoice
2026-08-15 05:55:55 +00:00
// Dependencies: [5, 19, 1391, 1979, 676, 4011, 8724, 8744, 8733, 1231, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-15 05:55:55 +00:00
// Module 16272 (useTransitionToConnectedActivityInVoice)
2026-07-23 10:11:24 +00:00
import getEmbeddedActivityLocationChannelId from "getEmbeddedActivityLocationChannelId";
2026-07-29 08:29:29 +00:00
import noop from "noop";
import ensureGuildLoaded from "ensureGuildLoaded";
import handleConnectionOpen from "handleConnectionOpen";
2026-07-23 10:11:24 +00:00
import { ComponentActions } from "ME";
const require = arg1;
2026-07-29 08:29:29 +00:00
const result = require("ensureGuildLoaded").fileFinishedImporting("modules/activities/utils/useTransitionToConnectedActivityInVoice.tsx");
2026-07-20 16:05:17 +00:00
export default function useTransitionToConnectedActivityInVoice(onTransition) {
onTransition = onTransition.onTransition;
const items = [onTransition];
const effect = React.useEffect(() => {
function handler() {
2026-07-29 08:29:29 +00:00
const self = this;
const apply = _handler.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
2026-07-20 16:05:17 +00:00
}
function _handler() {
2026-07-29 08:29:29 +00:00
const self = this;
const tmp = outer2_3((arg0) => {
let closure_0 = arg0;
let c3 = 0;
let c4 = 0;
const iter = (function*(arg0) {
if (c4 === 2) {
c4 = 3;
HermesBuiltin.throwTypeError();
} else if (tmp4 === 3) {
if (arg0 === 1) {
throw arg1;
} else if (arg0 === 2) {
let obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
2026-08-15 05:55:55 +00:00
return { value: "HermesInternal", done: "HermesInternal" };
2026-07-29 08:29:29 +00:00
}
} else {
try {
c4 = 2;
if (0 === guild_id) {
if (arg0 === 1) {
c4 = 3;
throw arg1;
} else if (arg0 === 2) {
c4 = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
guild_id = tmp5;
let callback = tmp2;
let location;
location = location.location;
callback = undefined;
guild_id = undefined;
guild_id = undefined;
guild_id = 1;
c4 = 1;
2026-08-12 06:57:52 +00:00
return { value: "ct", done: true };
2026-07-29 08:29:29 +00:00
}
} else {
if (1 === tmp5) {
if (arg0 === 1) {
c4 = 3;
throw arg1;
} else if (arg0 === 2) {
c4 = 3;
const obj1 = { value: null, done: true };
obj1[0] = arg1;
return obj1;
} else {
callback = outer2_0(outer2_2[5]).getEmbeddedActivityLocationChannelId(location);
if (null != callback) {
if (callback(outer2_2[6])(callback)) {
if (outer2_6.getVoiceChannelId() !== callback) {
const obj2 = { channelId: null };
obj2[0] = callback;
guild_id = 2;
c4 = 1;
const obj3 = { value: null, done: false };
obj3[0] = callback(outer2_2[7])(obj2);
return obj3;
}
}
}
c4 = 3;
2026-08-15 05:55:55 +00:00
return { value: "HermesInternal", done: "HermesInternal" };
2026-07-29 08:29:29 +00:00
}
} else if (arg0 === 1) {
c4 = 3;
throw arg1;
} else if (arg0 === 2) {
c4 = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
}
guild_id = outer2_5.getChannel(callback);
guild_id = undefined;
if (guild_id != null) {
guild_id = guild_id.guild_id;
}
const _setTimeout = setTimeout;
const timerId = setTimeout(() => { ... }, 0);
}
} catch (tmp25) {
c4 = tmp;
throw tmp25;
}
}
})();
iter.next();
return iter;
});
const _handler = tmp;
const apply = tmp.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
let ComponentDispatch = onTransition(outer1_2[9]).ComponentDispatch;
const subscription = ComponentDispatch.subscribe(outer1_7.OPEN_EMBEDDED_ACTIVITY, handler);
2026-07-20 16:05:17 +00:00
return () => {
2026-07-23 10:11:24 +00:00
const ComponentDispatch = onTransition(outer2_2[9]).ComponentDispatch;
ComponentDispatch.unsubscribe(outer2_7.OPEN_EMBEDDED_ACTIVITY, handler);
2026-07-20 16:05:17 +00:00
};
}, items);
};