94 lines
4.9 KiB
TypeScript
94 lines
4.9 KiB
TypeScript
/* Metro module 15406; source: modules/activities/utils/useTransitionToConnectedActivityInVoice.tsx; dependencies: [5, 31, 1379, 1934, 661, 3774, 8102, 10653, 8111, 1239, 2] */
|
|
function _fun117857(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15603:6, offset: 0x024c35a8, size: 191 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
|
const env0_4 = importAll(31) /* metro dependency 31 */;
|
|
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
|
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
|
|
const env0_7 = (require(661) /* metro dependency 661: Constants */).ComponentActions;
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/useTransitionToConnectedActivityInVoice.tsx');
|
|
exports.default = useTransitionToConnectedActivityInVoice;
|
|
}
|
|
|
|
function useTransitionToConnectedActivityInVoice({onTransition}) { // fn#117858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15603:276, offset: 0x024c3667, size: 52 bytes, params: 2, frame: 14
|
|
env0_4.useEffect(function() {
|
|
var closure = _fun117860;
|
|
var env0_0 = closure;
|
|
var env0_1 = _fun117861;
|
|
var ComponentDispatch = require(dependencyMap[9]).ComponentDispatch;
|
|
ComponentDispatch.subscribe(ComponentActions.OPEN_EMBEDDED_ACTIVITY, closure);
|
|
return _fun117865;
|
|
}, [onTransition]);
|
|
}
|
|
|
|
function _fun117859() { // fn#117859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15603:356, offset: 0x024c369b, size: 86 bytes, params: 1, frame: 15
|
|
const closure = function() {
|
|
return _handler.apply(this, arguments);
|
|
};
|
|
let ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
|
|
const subscribe = ComponentDispatch.subscribe;
|
|
let OPEN_EMBEDDED_ACTIVITY = ComponentActions.OPEN_EMBEDDED_ACTIVITY;
|
|
Reflect.apply(subscribe, ComponentDispatch, [OPEN_EMBEDDED_ACTIVITY, closure]);
|
|
return function() {
|
|
var ComponentDispatch = require(dependencyMap[9]).ComponentDispatch;
|
|
var OPEN_EMBEDDED_ACTIVITY = ComponentActions.OPEN_EMBEDDED_ACTIVITY;
|
|
ComponentDispatch.unsubscribe(OPEN_EMBEDDED_ACTIVITY, handler_117860);
|
|
};
|
|
}
|
|
|
|
function _handler() { // fn#117861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15603:418, offset: 0x024c36f1, size: 53 bytes, params: 1, frame: 13
|
|
var environment;
|
|
const value = environment.__proto__.__proto__;
|
|
return env2_3(_fun117863).apply(this, arguments);
|
|
}
|
|
|
|
async function _fun117863({location}) { // fn#117863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15603:457, offset: 0x024c373a, size: 240 bytes, params: 2, frame: 19
|
|
var guild_id;
|
|
var channel;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = undefined;
|
|
await value;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
let binding = env4_0;
|
|
const embeddedActivityLocationChannelId = binding(env4_2[5]).getEmbeddedActivityLocationChannelId(location);
|
|
if (embeddedActivityLocationChannelId != null) {
|
|
binding = env4_1;
|
|
if (binding(env4_2[6])(embeddedActivityLocationChannelId)) {
|
|
binding = env4_6;
|
|
if (binding.getVoiceChannelId() === embeddedActivityLocationChannelId) {
|
|
channel = env4_5.getChannel(embeddedActivityLocationChannelId);
|
|
guild_id = channel == null ? value : channel.guild_id;
|
|
global.setTimeout(_fun117864, 0);
|
|
return value;
|
|
}
|
|
binding = env4_1;
|
|
await binding(env4_2[7])({channelId: embeddedActivityLocationChannelId});
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
binding = env4_5;
|
|
channel = binding.getChannel(embeddedActivityLocationChannelId);
|
|
guild_id = channel == null ? value : channel.guild_id;
|
|
global.setTimeout(_fun117864, 0);
|
|
return value;
|
|
}
|
|
}
|
|
return value;
|
|
}
|
|
|
|
function _fun117864() { // fn#117864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15603:679, offset: 0x024c382a, size: 65 bytes, params: 1, frame: 13
|
|
let value = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
|
|
env5_1(env5_2[8])(guild_id, location);
|
|
value = environment.__proto__.__proto__.__proto__.__proto__;
|
|
if (require != null) {
|
|
require();
|
|
}
|
|
}
|
|
|