Files
discord-decomp/sources/actions/SelectedChannelActionCreators.tsx
2026-07-28 01:06:53 +03:00

58 lines
3.6 KiB
TypeScript

/* Metro module 4796; source: actions/SelectedChannelActionCreators.tsx; dependencies: [4295, 1379, 4259, 661, 694, 1230, 4797, 9422, 2] */
import ChannelStore from '../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import MediaEngineStore from '../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */
import GameConsoleStore from '../modules/game_console/GameConsoleStore.tsx'; /* Metro dependency 4295 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
function _fun41542(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#41542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4974:6, offset: 0x01120ac8, size: 230 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
ConstantsModule.PopoutWindowKeys;
object = {selectChannel: selectChannel, selectPrivateChannel: function(a0) {
require(dependencyMap[5]).transitionTo(Routes.CHANNEL(ME, a0));
}, selectVoiceChannel: selectVoiceChannel, disconnect: disconnect};
(FileImportTrackerModule).fileFinishedImporting('actions/SelectedChannelActionCreators.tsx');
exports.default = object;
function selectChannel({guildId, channelId, messageId, jumpType, source, skipMessageFetch}) { // fn#41543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4974:178, offset: 0x01120bae, size: 121 bytes, params: 2, frame: 20
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CHANNEL_SELECT',
guildId: guildId === ME ? null : guildId, channelId: channelId, messageId: messageId, jumpType: jumpType,
source: source, skipMessageFetch: skipMessageFetch});
}
function selectVoiceChannel(a0) { // fn#41545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4974:457, offset: 0x01120c64, size: 165 bytes, params: 2, frame: 22
const value = a1;
const value2 = a2;
const value3 = a3;
const value4 = undefined;
const r6 = value !== value4 ? value : false;
const r5 = value2 !== value4 ? value2 : false;
const r4 = value3 !== value4 ? value3 : {};
const channel = ChannelStore.getChannel(a0);
const r3 = channel == null ? value4 : channel.getGuildId();
const mediaEngineStoreBinding = MediaEngineStore;
if (mediaEngineStoreBinding.isSupported()) {
if (a0 != null) {
MediaEngineStore.getMediaEngine().interact();
}
(require(4797) /* metro dependency 4797: SelectedChannelActionCreatorsAdditionalNative */).selectVoiceChannelAdditional(a0,
r3, r6, r5, r4);
}
return value4;
}
function disconnect() { // fn#41546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4974:655, offset: 0x01120d09, size: 74 bytes, params: 1, frame: 14
const remoteSessionId = GameConsoleStore.getRemoteSessionId();
if (remoteSessionId != null) {
(importAll(9422) /* metro dependency 9422: GameConsoleActionCreators */).remoteDisconnect(remoteSessionId);
}
this.selectVoiceChannel(null);
}
}
global.__d(_fun41542, 4796, [4295, 1379, 4259, 661, 694, 1230, 4797, 9422,
2]) /* metro module 4796, dependencies: [4295, 1379, 4259, 661, 694, 1230, 4797, 9422, 2] */;