2026-10-01 06:55:13 +00:00
|
|
|
// Module ID: 17118
|
|
|
|
|
// Function ID: 17119
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: useTransitionToConnectedActivityInVoice
|
2026-10-01 06:55:13 +00:00
|
|
|
// Dependencies: [5, 19, 2044, 2098, 1074, 4487, 8995, 8996, 9021, 1110, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: default
|
|
|
|
|
|
2026-10-01 06:55:13 +00:00
|
|
|
// Module 17118 (useTransitionToConnectedActivityInVoice)
|
2026-09-15 14:23:42 +00:00
|
|
|
import ComponentDispatchUtils from "ComponentDispatchUtils" /* 1110 */;
|
2026-09-10 05:38:07 +00:00
|
|
|
import asyncGeneratorStep from "asyncGeneratorStep" /* 5 */;
|
|
|
|
|
import noop from "module_19" /* 19 */;
|
2026-10-01 06:55:13 +00:00
|
|
|
import ChannelStore from "ChannelStore" /* 2044 */;
|
|
|
|
|
import SelectedChannelStore from "SelectedChannelStore" /* 2098 */;
|
2026-07-23 10:11:24 +00:00
|
|
|
|
2026-09-10 05:38:07 +00:00
|
|
|
require = fn;
|
|
|
|
|
const ComponentActions = fn(1074).ComponentActions;
|
|
|
|
|
const size = fn(2);
|
|
|
|
|
const result = size.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];
|
2026-09-10 05:38:07 +00:00
|
|
|
const effect = noop.useEffect(() => {
|
2026-07-20 16:05:17 +00:00
|
|
|
function handler() {
|
2026-07-29 08:29:29 +00:00
|
|
|
const self = this;
|
2026-09-10 05:38:07 +00:00
|
|
|
const apply = closure_1.apply;
|
2026-07-29 08:29:29 +00:00
|
|
|
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-09-10 05:38:07 +00:00
|
|
|
closure_1 = async function _handler(arg0) {
|
|
|
|
|
let _location = arg0;
|
|
|
|
|
c3 = 0;
|
|
|
|
|
c4 = 0;
|
|
|
|
|
let iter = (async (arg0, value) => {
|
|
|
|
|
if (c4 === 2) {
|
|
|
|
|
c4 = 3;
|
|
|
|
|
throw new TypeError("Generator functions may not be called on executing generators");
|
|
|
|
|
} else if (tmp4 === 3) {
|
|
|
|
|
if (arg0 === 1) {
|
|
|
|
|
throw value;
|
|
|
|
|
} else if (arg0 === 2) {
|
|
|
|
|
const obj2 = { value, done: true };
|
|
|
|
|
return obj2;
|
2026-07-29 08:29:29 +00:00
|
|
|
} else {
|
2026-09-10 05:38:07 +00:00
|
|
|
return { value: "HermesInternal", done: null };
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
try {
|
|
|
|
|
c4 = 2;
|
|
|
|
|
if (0 === c3) {
|
|
|
|
|
if (arg0 === 1) {
|
|
|
|
|
c4 = 3;
|
|
|
|
|
throw value;
|
|
|
|
|
} else if (arg0 === 2) {
|
|
|
|
|
c4 = 3;
|
|
|
|
|
const obj3 = { value, done: true };
|
|
|
|
|
return obj3;
|
|
|
|
|
} else {
|
|
|
|
|
closure_2 = tmp5;
|
|
|
|
|
closure_1 = tmp2;
|
|
|
|
|
let _location2;
|
|
|
|
|
_location2 = _location.location;
|
|
|
|
|
let embeddedActivityLocationChannelId;
|
|
|
|
|
let channel2;
|
|
|
|
|
closure_129_3 = undefined;
|
|
|
|
|
c3 = 1;
|
|
|
|
|
c4 = 1;
|
2026-10-01 06:55:13 +00:00
|
|
|
return { value: "flex", done: null };
|
2026-09-10 05:38:07 +00:00
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if (1 === tmp5) {
|
2026-07-29 08:29:29 +00:00
|
|
|
if (arg0 === 1) {
|
|
|
|
|
c4 = 3;
|
2026-09-10 05:38:07 +00:00
|
|
|
throw value;
|
2026-07-29 08:29:29 +00:00
|
|
|
} else if (arg0 === 2) {
|
|
|
|
|
c4 = 3;
|
2026-09-10 05:38:07 +00:00
|
|
|
const obj4 = { value, done: true };
|
|
|
|
|
return obj4;
|
2026-07-29 08:29:29 +00:00
|
|
|
} else {
|
2026-10-01 06:55:13 +00:00
|
|
|
embeddedActivityLocationChannelId = handler(4487).getEmbeddedActivityLocationChannelId(_location2);
|
2026-09-10 05:38:07 +00:00
|
|
|
if (null != embeddedActivityLocationChannelId) {
|
2026-10-01 06:55:13 +00:00
|
|
|
if (closure_2_1(8995)(embeddedActivityLocationChannelId)) {
|
2026-09-10 05:38:07 +00:00
|
|
|
if (voiceChannelId.getVoiceChannelId() !== embeddedActivityLocationChannelId) {
|
|
|
|
|
const obj5 = { channelId: embeddedActivityLocationChannelId };
|
|
|
|
|
c3 = 2;
|
|
|
|
|
c4 = 1;
|
2026-10-01 06:55:13 +00:00
|
|
|
const obj6 = { value: closure_2_1(8996)(obj5), done: false };
|
2026-09-10 05:38:07 +00:00
|
|
|
return obj6;
|
2026-07-29 08:29:29 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
c4 = 3;
|
2026-09-10 05:38:07 +00:00
|
|
|
return { value: "HermesInternal", done: null };
|
2026-07-29 08:29:29 +00:00
|
|
|
}
|
2026-09-10 05:38:07 +00:00
|
|
|
} else if (arg0 === 1) {
|
|
|
|
|
c4 = 3;
|
|
|
|
|
throw value;
|
|
|
|
|
} else if (arg0 === 2) {
|
|
|
|
|
c4 = 3;
|
|
|
|
|
const obj = { value, done: true };
|
|
|
|
|
return obj;
|
|
|
|
|
}
|
|
|
|
|
channel2 = channel.getChannel(embeddedActivityLocationChannelId);
|
|
|
|
|
let guild_id;
|
|
|
|
|
if (channel2 != null) {
|
|
|
|
|
guild_id = channel2.guild_id;
|
2026-07-29 08:29:29 +00:00
|
|
|
}
|
2026-09-10 05:38:07 +00:00
|
|
|
closure_129_3 = guild_id;
|
|
|
|
|
const _setTimeout = setTimeout;
|
|
|
|
|
const timerId = setTimeout(() => {
|
2026-10-01 06:55:13 +00:00
|
|
|
closure_3_1(9021)(closure_1_3, _location);
|
2026-09-10 05:38:07 +00:00
|
|
|
if (closure_0 != null) {
|
|
|
|
|
closure_0();
|
|
|
|
|
}
|
|
|
|
|
}, 0);
|
2026-07-29 08:29:29 +00:00
|
|
|
}
|
2026-09-10 05:38:07 +00:00
|
|
|
} catch (tmp25) {
|
|
|
|
|
c4 = tmp;
|
|
|
|
|
throw tmp25;
|
2026-07-29 08:29:29 +00:00
|
|
|
}
|
2026-09-10 05:38:07 +00:00
|
|
|
}
|
|
|
|
|
})();
|
|
|
|
|
iter.next();
|
|
|
|
|
return iter;
|
|
|
|
|
};
|
|
|
|
|
let ComponentDispatch = onTransition(dependencyMap[9]).ComponentDispatch;
|
|
|
|
|
const subscription = ComponentDispatch.subscribe(constants.OPEN_EMBEDDED_ACTIVITY, handler);
|
2026-07-20 16:05:17 +00:00
|
|
|
return () => {
|
2026-09-10 05:38:07 +00:00
|
|
|
const ComponentDispatch = ComponentDispatchUtils.ComponentDispatch;
|
|
|
|
|
ComponentDispatch.unsubscribe(ComponentActions.OPEN_EMBEDDED_ACTIVITY, handler);
|
2026-07-20 16:05:17 +00:00
|
|
|
};
|
|
|
|
|
}, items);
|
|
|
|
|
};
|