decord/source/modules/connectivity/native/useGlobalStatusIndicatorState.tsx

100 lines
3.3 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 10853
// Function ID: 10854
2026-07-20 16:05:17 +00:00
// Name: useGlobalStatusIndicatorState
2026-08-25 06:04:03 +00:00
// Dependencies: [1391, 4454, 10854, 676, 10747, 10855, 589, 10852, 10850, 4234, 4615, 10856, 10857, 2]
2026-07-20 16:05:17 +00:00
// Exports: useGlobalStatusIndicatorState
2026-08-25 06:04:03 +00:00
// Module 10853 (useGlobalStatusIndicatorState)
import useIsInvitedToSpeakDefault from "useIsInvitedToSpeak" /* 10852 */;
import useVoiceStateForRemoteSessionDefault from "useVoiceStateForRemoteSession" /* 10855 */;
import useMyCurrentStageChannelDefault from "useMyCurrentStageChannel" /* 10857 */;
2026-08-24 06:08:38 +00:00
import closure_3 from "ensureGuildLoaded" /* 1391 */;
2026-08-25 06:04:03 +00:00
import closure_4 from "createRTCConnection" /* 4454 */;
import { RTC_PANEL_HEIGHT } from "RTC_PANEL_HEIGHT" /* 10854 */;
2026-08-24 06:08:38 +00:00
import { EMPTY_STRING_SNOWFLAKE_ID } from "ME" /* 676 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/connectivity/native/useGlobalStatusIndicatorState.tsx");
2026-07-20 16:05:17 +00:00
export const useGlobalStatusIndicatorState = function useGlobalStatusIndicatorState(flag) {
if (flag === undefined) {
flag = false;
}
2026-07-23 10:11:24 +00:00
let stateFromStores;
2026-08-24 06:08:38 +00:00
importDefault = undefined;
2026-08-25 06:04:03 +00:00
let obj = stateFromStores(10747);
2026-07-29 08:29:29 +00:00
let hasPipParticipant = obj.useHasPipParticipant({ isActivityViewFocused: false });
2026-08-24 06:08:38 +00:00
const tmp5 = useVoiceStateForRemoteSessionDefault();
const items = [closure_4];
2026-07-29 08:29:29 +00:00
stateFromStores = stateFromStores(589).useStateFromStores(items, () => channelId.getChannelId());
2026-08-24 06:08:38 +00:00
const tmp7 = useIsInvitedToSpeakDefault();
2026-07-29 08:29:29 +00:00
importDefault = tmp7;
const obj2 = stateFromStores(589);
const tmp4 = importDefault;
2026-08-24 06:08:38 +00:00
const items1 = [closure_3];
2026-07-29 08:29:29 +00:00
const items2 = [stateFromStores, tmp7];
const stateFromStores1 = stateFromStores(589).useStateFromStores(items1, () => {
2026-08-24 06:08:38 +00:00
const channel = closure_1_3.getChannel(stateFromStores);
2026-07-20 16:05:17 +00:00
let isGuildStageVoiceResult;
2026-07-29 08:29:29 +00:00
if (channel != null) {
2026-07-20 16:05:17 +00:00
isGuildStageVoiceResult = channel.isGuildStageVoice();
}
if (isGuildStageVoiceResult) {
2026-08-24 06:08:38 +00:00
isGuildStageVoiceResult = !closure_1;
2026-07-20 16:05:17 +00:00
}
return isGuildStageVoiceResult;
}, items2);
2026-07-29 08:29:29 +00:00
const obj3 = stateFromStores(589);
2026-08-25 06:04:03 +00:00
let num = stateFromStores(10850).useGetStageRTCPanelHeight(stateFromStores);
stateFromStores(4234);
2026-07-29 08:29:29 +00:00
let tmp12 = null != tmp5;
if (tmp12) {
2026-08-25 06:04:03 +00:00
let tmpResult = tmp(4615);
2026-07-29 08:29:29 +00:00
let channelId = tmp5.channelId;
if (channelId == null) {
2026-07-20 16:05:17 +00:00
channelId = EMPTY_STRING_SNOWFLAKE_ID;
}
2026-07-29 08:29:29 +00:00
tmp12 = tmpResult.getVoiceChannelKey(channelId) !== tmp11;
2026-07-20 16:05:17 +00:00
}
2026-08-25 06:04:03 +00:00
tmpResult = tmp(10856);
2026-07-29 08:29:29 +00:00
let isVoicePanelShowing = tmpResult.useIsVoicePanelShowing();
2026-08-24 06:08:38 +00:00
const tmp14 = null != useMyCurrentStageChannelDefault();
2026-07-29 08:29:29 +00:00
if (!isVoicePanelShowing) {
let tmp15 = !tmp12;
if (!tmp12) {
let tmp16 = !tmp14;
if (tmp14) {
tmp16 = !tmp7;
}
tmp15 = tmp16;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (tmp15) {
let tmp17 = !tmp9;
if (tmp9) {
2026-07-20 16:05:17 +00:00
if (hasPipParticipant) {
2026-07-29 08:29:29 +00:00
hasPipParticipant = !flag;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp17 = hasPipParticipant;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp15 = tmp17;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
isVoicePanelShowing = tmp15;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let tmp18 = !isVoicePanelShowing;
if (isVoicePanelShowing) {
2026-07-20 16:05:17 +00:00
num = 0;
2026-07-29 08:29:29 +00:00
if (!isVoicePanelShowing) {
2026-07-20 16:05:17 +00:00
num = RTC_PANEL_HEIGHT;
}
}
2026-07-29 08:29:29 +00:00
obj = { height: num, isVisible: tmp18, isCustomBackground: null };
if (!isVoicePanelShowing) {
tmp18 = tmp9;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (tmp18) {
tmp18 = !stateFromStores1;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[2] = tmp18;
2026-07-20 16:05:17 +00:00
return obj;
};