Files
2026-07-28 01:06:53 +03:00

146 lines
8.2 KiB
TypeScript

/* Metro module 15823; source: modules/channel/SelectedChannelManager.tsx; dependencies: [6, 7, 15, 17, 18, 4259, 1934, 3969, 661, 6947, 4796, 1230, 694, 4860, 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 Dispatcher from '../../Dispatcher.tsx'; /* Metro dependency 694 */
import SelectedChannelStore from '../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import SelectedGuildStore from '../../stores/SelectedGuildStore.tsx'; /* Metro dependency 3969 */
import MediaEngineStore from '../../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as SelectedChannelStoreModule from '../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
function _fun121611(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121611, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16031:6, offset: 0x0254bfdb, size: 349 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = ConstantsModule;
const env0_12 = value.ChannelTypes;
const env0_13 = value.Routes;
const env0_14 = value.ME;
const env0_15 = value.NULL_STRING_GUILD_ID;
value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
value = _fun121615(value);
value = new value();
(FileImportTrackerModule).fileFinishedImporting('modules/channel/SelectedChannelManager.tsx');
exports.default = value;
function _isNativeReflectConstruct_121612() { // fn#121612, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16031:282, offset: 0x0254c138, 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_121612_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun121615(a0) { // fn#121615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16031:485, offset: 0x0254c19a, size: 122 bytes, params: 2, frame: 16
const SelectedChannelManager2 = SelectedChannelManager;
Inherits(SelectedChannelManager2, a0);
return CreateClass(SelectedChannelManager2, [{key: 'handleGuildCreate', value: value_121617},
{key: 'handleChannelCreate', value: value_121618}, {key: 'handleLogout', value: value_121619}]);
function SelectedChannelManager(a0) { // fn#121616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16031:497, offset: 0x0254c214, size: 167 bytes, params: 2, frame: 19
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, SelectedChannelManager);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(SelectedChannelManager);
binding = env1_5;
if (_isNativeReflectConstruct_121612()) {
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.actions = {GUILD_CREATE: value.handleGuildCreate, CHANNEL_CREATE: value.handleChannelCreate,
LOGOUT: value.handleLogout};
return value;
}
function value_121617({guild}) { // fn#121617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16031:947, offset: 0x0254c2bb, size: 174 bytes, params: 2, frame: 14
var moduleValue;
var defaultImport;
const selectedChannelStoreBinding = SelectedChannelStore;
const channelId = selectedChannelStoreBinding.getChannelId(ME);
const voiceChannelId = selectedChannelStoreBinding.getVoiceChannelId();
if (guild.id === channelId) {
moduleValue = require(6947) /* metro dependency 6947: transitionToGuildNative */;
moduleValue.transitionToGuild(guild.id);
}
if (guild.id === voiceChannelId && guild.unavailable !== false && voiceChannelId == null) {
defaultImport = importDefault(4796) /* metro dependency 4796: SelectedChannelActionCreators */;
defaultImport.selectVoiceChannel(findFirstVoiceChannelId(guild.id));
}
}
function value_121618({channel}) { // fn#121618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16031:1168, offset: 0x0254c369, size: 238 bytes, params: 2, frame: 19
var r3;
var originChannelId;
var channelId;
var moduleValue;
var id;
var defaultImport;
var selectVoiceChannel;
var mediaEngineStoreBinding;
const type = channel.type;
const GROUP_DM = ChannelTypes.GROUP_DM;
if (type === GROUP_DM) {
originChannelId = channel.originChannelId;
channelId = SelectedChannelStore.getChannelId(NULL_STRING_GUILD_ID);
r3 = SelectedGuildStore.getGuildId() == null && originChannelId != null;
r3 = r3 && originChannelId === channelId;
if (r3) {
moduleValue = require(1230) /* metro dependency 1230: router_utils */;
moduleValue.transitionTo(Routes.CHANNEL(ME, channel.id));
}
if (originChannelId != null && originChannelId === SelectedChannelStore.getVoiceChannelId()) {
defaultImport = importDefault(4796) /* metro dependency 4796: SelectedChannelActionCreators */;
selectVoiceChannel = defaultImport.selectVoiceChannel;
id = channel.id;
mediaEngineStoreBinding = MediaEngineStore;
Reflect.apply(selectVoiceChannel, defaultImport, [id, mediaEngineStoreBinding.isVideoEnabled()]);
}
}
}
function value_121619() { // fn#121619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16031:1455, offset: 0x0254c457, size: 51 bytes, params: 1, frame: 12
const value = environment.__proto__;
(Dispatcher).dispatch({'type': 'VOICE_CHANNEL_SELECT',
'channelId': null, 'guildId': null, 'video': false, 'currentVoiceChannelId': null, 'joinVoiceId': null});
}
}
}
global.__d(_fun121611, 15823, [6, 7, 15, 17, 18, 4259, 1934, 3969, 661, 6947, 4796, 1230, 694, 4860,
2]) /* metro module 15823, dependencies: [6, 7, 15, 17, 18, 4259, 1934, 3969, 661, 6947, 4796, 1230, 694, 4860, 2] */;