Files
discord-decomp/sources/modules/voice_calls/native/VoiceActionSheetManager.tsx
T
2026-07-28 01:06:53 +03:00

113 lines
6.2 KiB
TypeScript

/* Metro module 12085; source: modules/voice_calls/native/VoiceActionSheetManager.tsx; dependencies: [6, 7, 15, 17, 18, 4259, 4297, 694, 7709, 4561, 2] */
import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import MediaEngineStore from '../../../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */
import VoiceStateStore from '../../../stores/VoiceStateStore.tsx'; /* Metro dependency 4297 */
import LifecycleManager from '../../../lib/LifecycleManager.tsx'; /* Metro dependency 4561 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun92859(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12271:6, offset: 0x0209c013, size: 262 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = LifecycleManager;
value = _fun92863(value);
value = new value();
(FileImportTrackerModule).fileFinishedImporting('modules/voice_calls/native/VoiceActionSheetManager.tsx');
exports.default = value;
function _isNativeReflectConstruct_92860() { // fn#92860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12271:168, offset: 0x0209c119, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_92860_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun92863(a0) { // fn#92863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12271:371, offset: 0x0209c17b, size: 97 bytes, params: 2, frame: 16
const VoiceActionSheetManager2 = VoiceActionSheetManager;
Inherits(VoiceActionSheetManager2, a0);
return CreateClass(VoiceActionSheetManager2, [{key: '_initialize', value: function(a0) {
this.channel = a0;
VoiceStateStore.addChangeListener(this.handleOpenChannelCallModal);
MediaEngineStore.addChangeListener(this.handleOpenChannelCallModal);
}}, {key: '_terminate', value: function() {
VoiceStateStore.removeChangeListener(this.handleOpenChannelCallModal);
MediaEngineStore.removeChangeListener(this.handleOpenChannelCallModal);
}}]);
function VoiceActionSheetManager(a0) { // fn#92864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12271:383, offset: 0x0209c1dc, size: 153 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, VoiceActionSheetManager);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(VoiceActionSheetManager);
binding = env1_5;
if (_isNativeReflectConstruct_92860()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.channel = null;
value.handleOpenChannelCallModal = handleOpenChannelCallModal;
return value;
function handleOpenChannelCallModal() { // fn#92865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12271:682, owner: VoiceActionSheetManager.handleOpenChannelCallModal, offset: 0x0209c275, size: 85 bytes, params: 1, frame: 13
var environment;
var value2;
const channel = channel2.channel;
var channel2 = channel;
if (channel != null) {
value2 = environment.__proto__.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).wait(_fun92866);
channel2.terminate();
}
function _fun92866() { // fn#92866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12271:727, offset: 0x0209c2ca, size: 65 bytes, params: 1, frame: 15
let value = environment.__proto__.__proto__.__proto__;
value = require(7709) /* metro dependency 7709: PrivateChannelCallUtils */;
const dismissVoiceChannelScreens = value.dismissVoiceChannelScreens;
const channelBinding = channel;
Reflect.apply(dismissVoiceChannelScreens, value, [channelBinding]);
(require(7709) /* metro dependency 7709: PrivateChannelCallUtils */).openChannelCallModal(channelBinding);
}
}
}
}
}
global.__d(_fun92859, 12085, [6, 7, 15, 17, 18, 4259, 4297, 694, 7709, 4561,
2]) /* metro module 12085, dependencies: [6, 7, 15, 17, 18, 4259, 4297, 694, 7709, 4561, 2] */;