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

133 lines
6.1 KiB
TypeScript

/* Metro module 7719; source: modules/video_calls/native/useIsPrivateAudioOnlyCall.tsx; dependencies: [57, 1378, 4606, 4492, 4259, 4297, 4299, 566, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import EmbeddedActivitiesStore from '../../activities/EmbeddedActivitiesStore.tsx'; /* Metro dependency 1378 */
import MediaEngineStore from '../../../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */
import VoiceStateStore from '../../../stores/VoiceStateStore.tsx'; /* Metro dependency 4297 */
import ApplicationStreamingStore from '../../../stores/ApplicationStreamingStore.tsx'; /* Metro dependency 4492 */
import ChannelRTCStore from '../../calls/ChannelRTCStore.tsx'; /* Metro dependency 4606 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as CallConstantsModule from '../../calls/CallConstants.tsx'; /* Metro dependency 4299 */
function _fun61761(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7897:6, offset: 0x01b4a073, size: 223 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/useIsPrivateAudioOnlyCall.tsx');
exports.default = _default_61763;
function _default_61763(a0) { // fn#61763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7897:260, offset: 0x01b4a152, size: 221 bytes, params: 2, frame: 22
const env0_0 = a0;
const useStateFromStores = FluxModule.useStateFromStores;
const property = Module00057(Reflect.apply(useStateFromStores, FluxModule, [[ChannelRTCStore], _fun61764, [a0],
areParticipantStatesEqual]), 1)[0];
const embeddedActivitiesStoreBinding = EmbeddedActivitiesStore;
const getEmbeddedActivitiesForChannel = embeddedActivitiesStoreBinding.getEmbeddedActivitiesForChannel;
return FluxModule.useStateFromStores([VoiceStateStore, MediaEngineStore, ApplicationStreamingStore], _fun61765, [a0,
Reflect.apply(getEmbeddedActivitiesForChannel, embeddedActivitiesStoreBinding,
[a0.id]).length > 0 || isActivityParticipant(property)]);
function _fun61764() { // fn#61764, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7897:302, offset: 0x01b4a22f, size: 60 bytes, params: 1, frame: 12
const value = environment.__proto__;
const channelRTCStoreBinding = ChannelRTCStore;
const getSelectedParticipant = channelRTCStoreBinding.getSelectedParticipant;
const binding = env0_0;
const getParticipantsVersion = channelRTCStoreBinding.getParticipantsVersion;
return [Reflect.apply(getSelectedParticipant, channelRTCStoreBinding, [binding.id]),
Reflect.apply(getParticipantsVersion, channelRTCStoreBinding, [binding.id])];
}
function _fun61765() { // fn#61765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7897:514, offset: 0x01b4a26b, size: 167 bytes, params: 1, frame: 13
var mediaEngineStoreBinding;
var value;
let r0 = env0_0.isPrivate() && !VoiceStateStore.hasVideo(env0_0.id) && !env0_1;
r0 = r0 && ApplicationStreamingStore.getAllApplicationStreamsForChannel(env0_0.id).length === 0 && ApplicationStreamingStore.getAllActiveStreamsForChannel(env0_0.id).length === 0;
if (r0) {
value = environment.__proto__;
mediaEngineStoreBinding = MediaEngineStore;
value = !mediaEngineStoreBinding.isVideoEnabled();
r0 = value;
}
return r0;
}
}
}
function areParticipantStatesEqual(a0, a1) { // fn#61762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7897:188, offset: 0x010e59c7, size: 168 bytes, params: 3, frame: 14
var r1;
var r2;
var r3;
var r4;
var r5;
var r8;
var item3;
var value3;
var item5;
var value5;
let iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
const value = undefined;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value2 = item2 === value;
if (value2) {
}
if (value2) {
r1 = item2;
r2 = value2;
r3 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r1 = item3;
r2 = value3;
r3 = value;
} else {
r1 = item3;
r2 = value3;
r3 = item;
}
}
if (!r2) {
r1.return();
}
iterator = a1[Symbol.iterator]();
const iterator3 = iterator.next;
let item4 = Reflect.apply(iterator3, iterator, []);
item = item4.value;
item4 = item4.done ? undefined : iterator;
const value4 = item4 === value;
if (value4) {
}
if (value4) {
r4 = item4;
r5 = value4;
r8 = value;
} else {
item5 = Reflect.apply(iterator3, item4, []);
item = item5.value;
item5 = item5.done ? undefined : item4;
value5 = item5 === value;
if (value5) {
r4 = item5;
r5 = value5;
r8 = value;
} else {
r4 = item5;
r5 = value5;
r8 = item;
}
}
if (!r5) {
r4.return();
}
return r3 === r8;
}
global.__d(_fun61761, 7719, [57, 1378, 4606, 4492, 4259, 4297, 4299, 566,
2]) /* metro module 7719, dependencies: [57, 1378, 4606, 4492, 4259, 4297, 4299, 566, 2] */;