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

127 lines
6.9 KiB
TypeScript

/* Metro module 7713; source: modules/voice_panel/VoicePanelUtils.native.tsx; dependencies: [1379, 4294, 7710, 7711, 632, 2] */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import RTCConnectionStore from '../../stores/RTCConnectionStore.tsx'; /* Metro dependency 4294 */
import VoicePanelStore from './VoicePanelStore.tsx'; /* Metro dependency 7710 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as UseStateFromStoresModule from '../../external/discord_common/js/packages/flux/useStateFromStores.tsx'; /* Metro dependency 632 */
import * as StageVoicePanelExperimentModule from '../stage_channels/StageVoicePanelExperiment.tsx'; /* Metro dependency 7711 */
function _fun61652(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7891:6, offset: 0x01b473f5, size: 201 bytes, params: 8, frame: 19
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/VoicePanelUtils.native.tsx');
exports.isVoicePanelEnabled = isVoicePanelEnabled;
exports.useIsVoicePanelShowing = function() {
return require(dependencyMap[4]).useStateFromStores([ChannelStore, RTCConnectionStore], _fun61655);
};
exports.useIsVoicePanelFullscreen = function() {
return VoicePanelStore(_fun61657);
};
exports.useIsVoicePanelOpen = function(a0) {
var env0_0 = a0;
return VoicePanelStore(_fun61659);
};
exports.useIsAnyVoicePanelOpen = function() {
return VoicePanelStore(_fun61661);
};
exports.useIsVoicePanelMounted = function(a0) {
var env0_0 = a0;
return VoicePanelStore(_fun61663);
};
function isVoicePanelEnabled(a0) { // fn#61653, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7891:228, offset: 0x01b474be, size: 92 bytes, params: 2, frame: 14
var r2;
var r0;
var r1;
let value = undefined;
const isStageVoicePanelEnabled2 = (StageVoicePanelExperimentModule).isStageVoicePanelEnabled('voice_panel_utils');
if (isStageVoicePanelEnabled2) {
r0 = !isStageVoicePanelEnabled2;
r1 = value;
} else {
r2 = a0 == null ? value : a0.isGuildStageVoice();
value = r2 != null;
r0 = value;
r1 = r2;
}
r0 = r0 && r1;
return !r0;
}
function useIsVoicePanelShowing() { // fn#61654, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7891:407, offset: 0x01b4751a, size: 65 bytes, params: 1, frame: 14
return (UseStateFromStoresModule).useStateFromStores([ChannelStore,
RTCConnectionStore], _fun61655);
function _fun61655() { // fn#61655, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7891:482, offset: 0x01b4755b, size: 116 bytes, params: 1, frame: 14
var r1;
var r0;
var isGuildStageVoice2;
let value = environment.__proto__;
const channelStoreBinding = ChannelStore;
const rtcConnectionStoreBinding = RTCConnectionStore;
const channelStore2 = channelStoreBinding !== undefined ? channelStoreBinding : ChannelStore;
const rtcConnectionStore2 = rtcConnectionStoreBinding !== undefined ? rtcConnectionStoreBinding : RTCConnectionStore;
const getChannel = channelStore2.getChannel;
const getChannelId = rtcConnectionStore2.getChannelId;
const value2 = Reflect.apply(getChannel, channelStore2, [Reflect.apply(getChannelId, rtcConnectionStore2, [])]);
const value3 = value2 != null;
if (value3) {
isGuildStageVoice2 = value2.isGuildStageVoice();
if (isGuildStageVoice2) {
value = require(7711) /* metro dependency 7711: StageVoicePanelExperiment */;
value = value.isStageVoicePanelEnabled('voice_panel_utils');
r1 = value;
} else {
r1 = !isGuildStageVoice2;
}
r0 = r1;
} else {
r0 = value3;
}
return r0;
}
}
function useIsVoicePanelFullscreen() { // fn#61656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7891:703, offset: 0x01b475cf, size: 23 bytes, params: 1, frame: 11
return VoicePanelStore(function(a0) {
return a0.isVoicePanelFullscreen();
});
}
function useIsVoicePanelOpen(a0) { // fn#61658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7891:805, offset: 0x01b475f5, size: 30 bytes, params: 2, frame: 11
const env0_0 = a0;
return VoicePanelStore(_fun61659);
function _fun61659(a0) { // fn#61659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7891:847, offset: 0x01b47613, size: 23 bytes, params: 2, frame: 11
return a0.isChannelOpen(env0_0);
}
}
function useIsAnyVoicePanelOpen() { // fn#61660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7891:897, offset: 0x01b4762a, size: 23 bytes, params: 1, frame: 11
return VoicePanelStore(function(a0) {
return a0.isAnyVoicePanelOpen();
});
}
function useIsVoicePanelMounted(a0) { // fn#61662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7891:996, offset: 0x01b47650, size: 30 bytes, params: 2, frame: 11
const env0_0 = a0;
return VoicePanelStore(_fun61663);
function _fun61663(a0) { // fn#61663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7891:1041, offset: 0x01b4766e, size: 23 bytes, params: 2, frame: 11
return a0.isMounted(env0_0);
}
}
}
function _fun61657(a0) { // fn#61657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7891:750, offset: 0x01b475e6, size: 15 bytes, params: 2, frame: 9
return a0.isVoicePanelFullscreen();
}
function _fun61661(a0) { // fn#61661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7891:941, offset: 0x01b47641, size: 15 bytes, params: 2, frame: 9
return a0.isAnyVoicePanelOpen();
}
global.__d(_fun61652, 7713, [1379, 4294, 7710, 7711, 632,
2]) /* metro module 7713, dependencies: [1379, 4294, 7710, 7711, 632, 2] */;