decord/source/modules/connectivity/native/components/GlobalStatusContent.tsx

141 lines
5 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 10859
// Function ID: 10860
2026-07-20 16:05:17 +00:00
// Name: ConnectivityGlobalStatusContent
2026-08-25 06:04:03 +00:00
// Dependencies: [19, 17, 1391, 1910, 4454, 4398, 10854, 676, 21, 4380, 712, 10855, 589, 10362, 10852, 1363, 4315, 4952, 4234, 10737, 500, 1629, 7893, 10860, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-25 06:04:03 +00:00
// Module 10859 (ConnectivityGlobalStatusContent)
2026-08-24 06:08:38 +00:00
import noopAll from "noop" /* 19 */;
import ThemesDefault from "Themes" /* 712 */;
2026-08-25 06:04:03 +00:00
import useCanCurrentUserSpeakInChannelDefault from "useCanCurrentUserSpeakInChannel" /* 10362 */;
import useIsInvitedToSpeakDefault from "useIsInvitedToSpeak" /* 10852 */;
import useVoiceStateForRemoteSessionDefault from "useVoiceStateForRemoteSession" /* 10855 */;
2026-08-24 06:08:38 +00:00
import { View } from "get ActivityIndicator" /* 17 */;
import closure_4 from "ensureGuildLoaded" /* 1391 */;
import closure_5 from "createGuildRecordFromRust" /* 1910 */;
2026-08-25 06:04:03 +00:00
import closure_6 from "createRTCConnection" /* 4454 */;
import closure_7 from "handleUpdate" /* 4398 */;
import { RTC_PANEL_HEIGHT } from "RTC_PANEL_HEIGHT" /* 10854 */;
2026-08-24 06:08:38 +00:00
import { RTCConnectionStates } from "ME" /* 676 */;
import jsxProd from "jsxProd" /* 21 */;
2026-08-25 06:04:03 +00:00
import createCacheKey from "createCacheKey" /* 4380 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
const require = arg1;
noopAll;
2026-07-31 08:44:05 +00:00
({ jsx: c10, jsxs: unpackModuleId } = jsxProd);
2026-07-29 08:29:29 +00:00
createCacheKey = { bgNeutral: null, bg: null, container: null };
2026-08-24 06:08:38 +00:00
createCacheKey = { backgroundColor: ThemesDefault.colors.BACKGROUND_BASE_LOWEST };
2026-07-29 08:29:29 +00:00
createCacheKey[0] = createCacheKey;
2026-08-24 06:08:38 +00:00
createCacheKey[1] = { backgroundColor: ThemesDefault.unsafe_rawColors.GREEN_360 };
2026-07-31 08:44:05 +00:00
createCacheKey[2] = { paddingHorizontal: 16, alignItems: "center", justifyContent: "center" };
2026-08-24 06:08:38 +00:00
let closure_12 = createCacheKey.createStyles(createCacheKey);
let obj1 = { backgroundColor: ThemesDefault.unsafe_rawColors.GREEN_360 };
const result = require("set").fileFinishedImporting("modules/connectivity/native/components/GlobalStatusContent.tsx");
2026-07-20 16:05:17 +00:00
export default function ConnectivityGlobalStatusContent() {
2026-08-24 06:08:38 +00:00
const tmp = callback2();
const tmp4 = useVoiceStateForRemoteSessionDefault();
const _require = tmp4;
let obj = _require(589);
const items = [closure_6, closure_5, closure_4, closure_7];
2026-07-29 08:29:29 +00:00
const items1 = [tmp4];
2026-07-20 16:05:17 +00:00
const stateFromStoresObject = obj.useStateFromStoresObject(items, () => {
let channelId;
2026-07-29 08:29:29 +00:00
if (closure_0 != null) {
2026-07-20 16:05:17 +00:00
channelId = tmp2.channelId;
}
2026-07-29 08:29:29 +00:00
if (channelId == null) {
2026-08-24 06:08:38 +00:00
channelId = closure_1_6.getChannelId();
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
const channel = closure_1_4.getChannel(channelId);
2026-07-29 08:29:29 +00:00
if (null != closure_0) {
2026-07-20 16:05:17 +00:00
let guildId;
2026-07-29 08:29:29 +00:00
if (channel != null) {
2026-07-20 16:05:17 +00:00
guildId = channel.getGuildId();
}
let guildId1 = guildId;
} else {
2026-08-24 06:08:38 +00:00
guildId1 = closure_1_6.getGuildId();
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let str;
2026-08-24 06:08:38 +00:00
const guild = closure_1_5.getGuild(guildId1);
2026-07-29 08:29:29 +00:00
if (closure_0 != null) {
str = tmp2.sessionId;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (str == null) {
str = "";
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
const sessionById = closure_1_7.getSessionById(str);
2026-07-20 16:05:17 +00:00
let os;
2026-07-29 08:29:29 +00:00
if (sessionById != null) {
2026-07-20 16:05:17 +00:00
os = sessionById.clientInfo.os;
}
2026-07-29 08:29:29 +00:00
const obj = { guild, channel, rtcConnectionState: null, remotePlatform: null };
if (null != closure_0) {
2026-08-24 06:08:38 +00:00
let RTC_CONNECTED = closure_1_9.RTC_CONNECTED;
2026-07-20 16:05:17 +00:00
} else {
2026-08-24 06:08:38 +00:00
RTC_CONNECTED = closure_1_6.getState();
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[2] = RTC_CONNECTED;
obj[3] = os;
2026-07-20 16:05:17 +00:00
return obj;
}, items1);
2026-07-23 10:11:24 +00:00
let channel = stateFromStoresObject.channel;
2026-07-20 16:05:17 +00:00
let isGuildStageVoiceResult;
({ guild, rtcConnectionState, remotePlatform } = stateFromStoresObject);
2026-07-29 08:29:29 +00:00
if (channel != null) {
2026-07-20 16:05:17 +00:00
isGuildStageVoiceResult = channel.isGuildStageVoice();
}
let id;
2026-07-29 08:29:29 +00:00
if (channel != null) {
2026-07-20 16:05:17 +00:00
id = channel.id;
}
2026-08-24 06:08:38 +00:00
let tmp2ResultResult = useCanCurrentUserSpeakInChannelDefault(id);
const tmp2Result = useCanCurrentUserSpeakInChannelDefault;
2026-08-11 06:20:06 +00:00
let tmp5Result = tmp5(1363);
2026-07-29 08:29:29 +00:00
let tmp14 = tmp12;
2026-08-24 06:08:38 +00:00
const tmp11 = useIsInvitedToSpeakDefault();
2026-07-20 16:05:17 +00:00
if (isGuildStageVoiceResult) {
2026-07-29 08:29:29 +00:00
if (!tmp2ResultResult) {
tmp2ResultResult = tmp11;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp14 = tmp2ResultResult;
2026-07-20 16:05:17 +00:00
}
2026-08-25 06:04:03 +00:00
tmp5Result = tmp5(4952);
2026-07-29 08:29:29 +00:00
let isScreenLandscape = tmp5Result.useIsScreenLandscape();
2026-07-20 16:05:17 +00:00
if (isScreenLandscape) {
2026-08-25 06:04:03 +00:00
isScreenLandscape = tmp5(4234).isModalOpen(tmp2(10737));
const tmp5Result1 = tmp5(4234);
2026-07-20 16:05:17 +00:00
}
if (isScreenLandscape) {
2026-07-29 08:29:29 +00:00
isScreenLandscape = tmp5(500).isAndroid();
const tmp5Result2 = tmp5(500);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let num = 0;
2026-07-20 16:05:17 +00:00
if (!isScreenLandscape) {
2026-08-15 05:55:55 +00:00
num = tmp2(1629)().top;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj = { style: items2, children: null };
2026-07-31 08:44:05 +00:00
items2 = [tmp14 ? tmp.bg : tmp.bgNeutral, tmp.container, ];
obj = { minHeight: RTC_PANEL_HEIGHT + num, paddingTop: num };
items2[2] = obj;
2026-07-20 16:05:17 +00:00
if (isScreenLandscape) {
2026-08-25 06:04:03 +00:00
isScreenLandscape = callback(tmp2(7893), { hidden: true });
2026-07-20 16:05:17 +00:00
}
const items3 = [isScreenLandscape, ];
2026-07-29 08:29:29 +00:00
let tmp19 = null;
2026-07-20 16:05:17 +00:00
if (isGuildStageVoiceResult) {
2026-08-24 06:08:38 +00:00
obj1 = { channel: null, guild: null, hasRTCConnectivity: null, isDarkTheme: null, rtcConnectionState: null, remotePlatform: null };
2026-07-31 08:44:05 +00:00
obj1[0] = channel;
obj1[1] = guild;
obj1[2] = tmp12;
obj1[3] = isThemeDarkResult;
obj1[4] = rtcConnectionState;
obj1[5] = remotePlatform;
2026-08-25 06:04:03 +00:00
tmp19 = callback(tmp2(10860), obj1);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
items3[1] = tmp19;
obj[1] = items3;
2026-07-31 08:44:05 +00:00
return closure_11(View, obj);
2026-07-20 16:05:17 +00:00
};