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

97 lines
3 KiB
TypeScript
Raw Normal View History

2026-08-07 06:50:47 +00:00
// Module ID: 10699
// Function ID: 10700
2026-07-20 16:05:17 +00:00
// Name: useGlobalStatusIndicatorState
2026-08-07 06:50:47 +00:00
// Dependencies: [1372, 4373, 10700, 676, 10595, 10701, 589, 10698, 10696, 4152, 4511, 10702, 10703, 2]
2026-07-20 16:05:17 +00:00
// Exports: useGlobalStatusIndicatorState
2026-08-07 06:50:47 +00:00
// Module 10699 (useGlobalStatusIndicatorState)
2026-07-29 08:29:29 +00:00
import ensureGuildLoaded from "ensureGuildLoaded";
import createRTCConnection from "createRTCConnection";
2026-07-23 10:11:24 +00:00
import { RTC_PANEL_HEIGHT } from "RTC_PANEL_HEIGHT";
import { EMPTY_STRING_SNOWFLAKE_ID } from "ME";
const require = arg1;
const result = require("RTC_PANEL_HEIGHT").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-07-20 16:05:17 +00:00
let importDefault;
2026-08-07 06:50:47 +00:00
let obj = stateFromStores(10595);
2026-07-29 08:29:29 +00:00
let hasPipParticipant = obj.useHasPipParticipant({ isActivityViewFocused: false });
2026-08-07 06:50:47 +00:00
const tmp5 = importDefault(10701)();
2026-07-29 08:29:29 +00:00
const items = [createRTCConnection];
stateFromStores = stateFromStores(589).useStateFromStores(items, () => channelId.getChannelId());
2026-08-07 06:50:47 +00:00
const tmp7 = importDefault(10698)();
2026-07-29 08:29:29 +00:00
importDefault = tmp7;
const obj2 = stateFromStores(589);
const tmp4 = importDefault;
const items1 = [ensureGuildLoaded];
const items2 = [stateFromStores, tmp7];
const stateFromStores1 = stateFromStores(589).useStateFromStores(items1, () => {
2026-07-23 10:11:24 +00:00
const channel = outer1_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-07-23 10:11:24 +00:00
isGuildStageVoiceResult = !c1;
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-07 06:50:47 +00:00
let num = stateFromStores(10696).useGetStageRTCPanelHeight(stateFromStores);
stateFromStores(4152);
2026-07-29 08:29:29 +00:00
let tmp12 = null != tmp5;
if (tmp12) {
2026-08-07 06:50:47 +00:00
let tmpResult = tmp(4511);
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-07 06:50:47 +00:00
tmpResult = tmp(10702);
2026-07-29 08:29:29 +00:00
let isVoicePanelShowing = tmpResult.useIsVoicePanelShowing();
2026-08-07 06:50:47 +00:00
const tmp14 = null != tmp4(10703)();
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;
};