84 lines
6.1 KiB
TypeScript
84 lines
6.1 KiB
TypeScript
/* Metro module 14542; source: modules/guild_sidebar/native/VoiceUser.tsx; dependencies: [31, 1378, 4606, 4492, 1226, 4259, 4296, 4297, 33, 566, 14543, 2] */
|
|
import AuthenticationStore from '../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
|
|
import EmbeddedActivitiesStore from '../../activities/EmbeddedActivitiesStore.tsx'; /* Metro dependency 1378 */
|
|
import MediaEngineStore from '../../../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */
|
|
import SessionsStore from '../../../stores/SessionsStore.tsx'; /* Metro dependency 4296 */
|
|
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 ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
|
|
|
|
function _fun110012(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14739:6, offset: 0x02365dd2, size: 250 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
ReactModule;
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/guild_sidebar/native/VoiceUser.tsx');
|
|
exports.default = VoiceUserConnected;
|
|
function VoiceUserConnected({channel, user, sessionId, member, selfMute, selfDeaf, selfVideo, mute, deaf, suppress, collapsed, isGuest}) { // fn#110013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14739:275, offset: 0x02365ecc, size: 630 bytes, params: 2, frame: 39
|
|
const value3 = AuthenticationStore.getId() === user.id;
|
|
const {localMute,
|
|
localVideo} = (FluxModule).useStateFromStoresObject([MediaEngineStore],
|
|
_fun110014);
|
|
let useStateFromStores = FluxModule.useStateFromStores;
|
|
const streamForUser = Reflect.apply(useStateFromStores, FluxModule, [[ApplicationStreamingStore], function() {
|
|
return ApplicationStreamingStore.getStreamForUser(user.id, channel.getGuildId());
|
|
}]);
|
|
const value6 = FluxModule.useStateFromStores([SessionsStore], _fun110016);
|
|
const value7 = FluxModule.useStateFromStores([VoiceStateStore], function() {
|
|
return VoiceStateStore.getVoicePlatformForChannel(channel.id, user.id);
|
|
}, [channel.id, user.id]);
|
|
const r10 = sessionId != null && value3 && sessionId !== AuthenticationStore.getSessionId();
|
|
useStateFromStores = FluxModule.useStateFromStores;
|
|
return ((Component) => <Component guildId={channel.guild_id} member={member} user={user} collapsed={collapsed} serverMute={mute || suppress} serverDeaf={deaf} mute={selfMute} deaf={selfDeaf} localMute={localMute} video={selfVideo || localVideo} stream={streamForUser?.channelId === channel.id} platform={value6} disabled={value6 == null && r10} isInEmbeddedActivity={Reflect.apply(useStateFromStores,
|
|
FluxModule, [[EmbeddedActivitiesStore], _fun110018, [user.id,
|
|
channel.id]]) != null} isGuest={isGuest} voicePlatform={value7} ringing={FluxModule.useStateFromStores([ChannelRTCStore],
|
|
function() {
|
|
return ChannelRTCStore.getGuildRingingUsers(channel.id).has(user.id);
|
|
})} />)(importDefault(14543) /* metro dependency 14543: VoiceUserItem */);
|
|
function _fun110014() { // fn#110014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14739:488, offset: 0x02366142, size: 96 bytes, params: 1, frame: 12
|
|
var r0;
|
|
var object;
|
|
var value2;
|
|
var mediaEngineStoreBinding;
|
|
if (result) {
|
|
object = {'localMute': false, 'localDeaf': false};
|
|
value = environment.__proto__;
|
|
object.localVideo = MediaEngineStore.isVideoEnabled();
|
|
r0 = object;
|
|
} else {
|
|
value2 = environment.__proto__;
|
|
mediaEngineStoreBinding = MediaEngineStore;
|
|
r0 = {'localMute': null, 'localDeaf': false, 'localVideo': false,
|
|
localMute: mediaEngineStoreBinding.isLocalMute(user.id)};
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function _fun110016() { // fn#110016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14739:756, offset: 0x023661d1, size: 66 bytes, params: 1, frame: 14
|
|
const sessionIdBinding = sessionId;
|
|
const value2 = undefined;
|
|
return sessionIdBinding != null ? SessionsStore.getSessionById(sessionId) == null ? value2 : SessionsStore.getSessionById(sessionId).clientInfo.os : value2;
|
|
}
|
|
|
|
function _fun110018() { // fn#110018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14739:1006, offset: 0x0236623d, size: 52 bytes, params: 1, frame: 11
|
|
var environment;
|
|
const value = environment.__proto__;
|
|
const embeddedActivitiesStoreBinding = EmbeddedActivitiesStore;
|
|
const getEmbeddedActivitiesForChannel = embeddedActivitiesStoreBinding.getEmbeddedActivitiesForChannel;
|
|
return Reflect.apply(getEmbeddedActivitiesForChannel, embeddedActivitiesStoreBinding,
|
|
[channel.id]).find(function({userIds}) {
|
|
return userIds.has(user.id);
|
|
});
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun110012, 14542, [31, 1378, 4606, 4492, 1226, 4259, 4296, 4297, 33, 566, 14543,
|
|
2]) /* metro module 14542, dependencies: [31, 1378, 4606, 4492, 1226, 4259, 4296, 4297, 33, 566, 14543, 2] */;
|