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

100 lines
3.3 KiB
TypeScript
Raw Normal View History

// Module ID: 9711
// Function ID: 9712
2026-07-20 16:05:17 +00:00
// Name: useGlobalStatusIndicatorState
// Dependencies: [1957, 4597, 9712, 1074, 9522, 9247, 504, 9710, 9708, 4431, 4781, 9713, 9714, 2]
2026-07-20 16:05:17 +00:00
// Exports: useGlobalStatusIndicatorState
// Module 9711 (useGlobalStatusIndicatorState)
import useVoiceStateForRemoteSessionDefault from "useVoiceStateForRemoteSession" /* 9247 */;
import useIsInvitedToSpeakDefault from "useIsInvitedToSpeak" /* 9710 */;
import ChannelStore from "ChannelStore" /* 1957 */;
import RTCConnectionStore from "RTCConnectionStore" /* 4597 */;
2026-07-23 10:11:24 +00:00
const useMyCurrentStageChannelDefault = tmp4(9714);
const require = fn;
const RTC_PANEL_HEIGHT = fn(9712).RTC_PANEL_HEIGHT;
const EMPTY_STRING_SNOWFLAKE_ID = fn(1074).EMPTY_STRING_SNOWFLAKE_ID;
const size = fn(2);
const result = size.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;
let hasPipParticipant = stateFromStores(9522).useHasPipParticipant({ isActivityViewFocused: false });
2026-08-24 06:08:38 +00:00
const tmp5 = useVoiceStateForRemoteSessionDefault();
const obj = stateFromStores(9522);
const items = [RTCConnectionStore];
stateFromStores = stateFromStores(504).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(504);
const items1 = [ChannelStore];
2026-07-29 08:29:29 +00:00
const items2 = [stateFromStores, tmp7];
const stateFromStores1 = stateFromStores(504).useStateFromStores(items1, () => {
const channel = ChannelStore.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);
const obj3 = stateFromStores(504);
let num = stateFromStores(9708).useGetStageRTCPanelHeight(stateFromStores);
stateFromStores(4431);
2026-07-29 08:29:29 +00:00
let tmp12 = null != tmp5;
if (tmp12) {
let channelId = tmp5.channelId;
if (channelId == null) {
2026-07-20 16:05:17 +00:00
channelId = EMPTY_STRING_SNOWFLAKE_ID;
}
tmp12 = tmp(4781).getVoiceChannelKey(channelId) !== tmp11;
const tmpResult = tmp(4781);
2026-07-20 16:05:17 +00:00
}
const obj4 = stateFromStores(9708);
let isVoicePanelShowing = stateFromStores(9713).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;
}
}
const obj5 = { height: num, isVisible: tmp18, isCustomBackground: null };
2026-07-29 08:29:29 +00:00
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
}
obj5.isCustomBackground = tmp18;
return obj5;
2026-07-20 16:05:17 +00:00
};