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

100 lines
3.2 KiB
TypeScript
Raw Normal View History

2026-09-03 10:05:34 +00:00
// Module ID: 9665
// Function ID: 9666
2026-07-20 16:05:17 +00:00
// Name: useGlobalStatusIndicatorState
2026-09-03 10:05:34 +00:00
// Dependencies: [1386, 4554, 9666, 673, 9556, 9667, 586, 9664, 9662, 4332, 4728, 9668, 9669, 2]
2026-07-20 16:05:17 +00:00
// Exports: useGlobalStatusIndicatorState
2026-09-03 10:05:34 +00:00
// Module 9665 (useGlobalStatusIndicatorState)
import useIsInvitedToSpeakDefault from "useIsInvitedToSpeak" /* 9664 */;
import useVoiceStateForRemoteSessionDefault from "useVoiceStateForRemoteSession" /* 9667 */;
import useMyCurrentStageChannelDefault from "useMyCurrentStageChannel" /* 9669 */;
2026-09-02 09:53:35 +00:00
import closure_3 from "ensureGuildLoaded" /* 1386 */;
2026-09-01 10:26:29 +00:00
import closure_4 from "createRTCConnection" /* 4554 */;
2026-09-03 10:05:34 +00:00
import { RTC_PANEL_HEIGHT } from "RTC_PANEL_HEIGHT" /* 9666 */;
2026-09-02 09:53:35 +00:00
import { EMPTY_STRING_SNOWFLAKE_ID } from "ME" /* 673 */;
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-09-03 10:05:34 +00:00
let obj = stateFromStores(9556);
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-09-02 09:53:35 +00:00
stateFromStores = stateFromStores(586).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;
2026-09-02 09:53:35 +00:00
const obj2 = stateFromStores(586);
2026-07-29 08:29:29 +00:00
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];
2026-09-02 09:53:35 +00:00
const stateFromStores1 = stateFromStores(586).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-09-02 09:53:35 +00:00
const obj3 = stateFromStores(586);
2026-09-03 10:05:34 +00:00
let num = stateFromStores(9662).useGetStageRTCPanelHeight(stateFromStores);
2026-09-01 10:26:29 +00:00
stateFromStores(4332);
2026-07-29 08:29:29 +00:00
let tmp12 = null != tmp5;
if (tmp12) {
2026-09-03 10:05:34 +00:00
let tmpResult = tmp(4728);
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-09-03 10:05:34 +00:00
tmpResult = tmp(9668);
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;
};