81 lines
5.4 KiB
TypeScript
81 lines
5.4 KiB
TypeScript
/* Metro module 10734; source: modules/connectivity/native/useGlobalStatusIndicatorState.tsx; dependencies: [1379, 4294, 10735, 661, 7734, 9325, 566, 10733, 10731, 4007, 7709, 7713, 10736, 2] */
|
|
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
|
|
import RTCConnectionStore from '../../../stores/RTCConnectionStore.tsx'; /* Metro dependency 4294 */
|
|
import UseVoiceStateForRemoteSession from '../../game_console/hooks/useVoiceStateForRemoteSession.tsx'; /* Metro dependency 9325 */
|
|
import UseIsInvitedToSpeak from '../../stage_channels/useIsInvitedToSpeak.tsx'; /* Metro dependency 10733 */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as NavigationRouteUtilsNativeModule from '../../main_tabs_v2/helpers/NavigationRouteUtils.native.tsx'; /* Metro dependency 4007 */
|
|
import * as UsePipVideoOrStreamModule from '../../video_calls/native/usePipVideoOrStream.tsx'; /* Metro dependency 7734 */
|
|
import * as StageChannelHeightHooksModule from '../../stage_channels/StageChannelHeightHooks.tsx'; /* Metro dependency 10731 */
|
|
import * as ConnectivityConstantsModule from './ConnectivityConstants.tsx'; /* Metro dependency 10735 */
|
|
|
|
function _fun82460(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82460, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10920:6, offset: 0x01ef7acf, size: 178 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/connectivity/native/useGlobalStatusIndicatorState.tsx');
|
|
exports.useGlobalStatusIndicatorState = useGlobalStatusIndicatorState;
|
|
function useGlobalStatusIndicatorState() { // fn#82461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10920:307, offset: 0x01ef7b81, size: 534 bytes, params: 1, frame: 25
|
|
var r10;
|
|
var r6;
|
|
var moduleValue6;
|
|
const value = a0;
|
|
let r1 = value !== undefined ? value : false;
|
|
const value2 = (UsePipVideoOrStreamModule).useHasPipParticipant({isActivityViewFocused: false});
|
|
const value3 = (UseVoiceStateForRemoteSession)();
|
|
const channelId = (require(566) /* metro dependency 566: flux */).useStateFromStores([RTCConnectionStore],
|
|
function() {
|
|
return RTCConnectionStore.getChannelId();
|
|
});
|
|
const value4 = (UseIsInvitedToSpeak)();
|
|
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], _fun82463,
|
|
[channelId, value4]);
|
|
const value6 = channelId != null;
|
|
const value7 = (StageChannelHeightHooksModule).useGetStageRTCPanelHeight(channelId);
|
|
const value8 = (NavigationRouteUtilsNativeModule).useOpenModalKey();
|
|
const value9 = value3 != null;
|
|
if (value9) {
|
|
moduleValue6 = require(7709) /* metro dependency 7709: PrivateChannelCallUtils */;
|
|
r10 = moduleValue6.getVoiceChannelKey(value3.channelId ?? EMPTY_STRING_SNOWFLAKE_ID) !== value8;
|
|
} else {
|
|
r10 = value9;
|
|
}
|
|
object = {};
|
|
object.voicePanelEnabled = (require(7713) /* metro dependency 7713: VoicePanelUtilsNative */).useIsVoicePanelShowing();
|
|
object.isRemoteVisible = r10;
|
|
object.isVoiceChannelSelected = value6;
|
|
object.hasPipParticipant = value2;
|
|
object.showWhenParticipantOnScreen = r1;
|
|
object.isConnectedToStageChannel = (importDefault(10736) /* metro dependency 10736: useMyCurrentStageChannel */)() != null;
|
|
object.isInvitedToSpeak = value4;
|
|
const voicePanelEnabled = object.voicePanelEnabled;
|
|
const isRemoteVisible = object.isRemoteVisible;
|
|
const isVoiceChannelSelected = object.isVoiceChannelSelected;
|
|
const hasPipParticipant = object.hasPipParticipant;
|
|
const showWhenParticipantOnScreen = object.showWhenParticipantOnScreen;
|
|
const isConnectedToStageChannel = object.isConnectedToStageChannel;
|
|
if (voicePanelEnabled) {
|
|
r1 = voicePanelEnabled;
|
|
} else {
|
|
r6 = !isRemoteVisible && (isConnectedToStageChannel ? !object.isInvitedToSpeak : !isConnectedToStageChannel);
|
|
r6 = r6 && (isVoiceChannelSelected ? hasPipParticipant && !showWhenParticipantOnScreen : !isVoiceChannelSelected);
|
|
r1 = r6;
|
|
}
|
|
const value16 = !r1;
|
|
object = {height: r1 ? r1 ? 0 : RTC_PANEL_HEIGHT : value4 ? value7 : r1 ? 0 : RTC_PANEL_HEIGHT, isVisible: value16};
|
|
r1 = (r1 ? value16 : value6) && !value5;
|
|
object.isCustomBackground = r1;
|
|
return object;
|
|
function _fun82463() { // fn#82463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10920:496, offset: 0x01ef7daa, size: 57 bytes, params: 1, frame: 12
|
|
const value = environment.__proto__;
|
|
return ChannelStore.getChannel(channelId)?.isGuildStageVoice() && !env0_1;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun82460, 10734, [1379, 4294, 10735, 661, 7734, 9325, 566, 10733, 10731, 4007, 7709, 7713, 10736,
|
|
2]) /* metro module 10734, dependencies: [1379, 4294, 10735, 661, 7734, 9325, 566, 10733, 10731, 4007, 7709, 7713, 10736, 2] */;
|