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

141 lines
5 KiB
TypeScript
Raw Normal View History

2026-09-02 09:53:35 +00:00
// Module ID: 9668
// Function ID: 9669
2026-07-20 16:05:17 +00:00
// Name: ConnectivityGlobalStatusContent
2026-09-02 09:53:35 +00:00
// Dependencies: [19, 17, 1386, 1908, 4554, 4496, 9662, 673, 21, 4478, 709, 9663, 586, 9564, 9660, 1362, 4413, 5079, 4332, 9539, 1234, 1627, 9543, 9669, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-09-02 09:53:35 +00:00
// Module 9668 (ConnectivityGlobalStatusContent)
2026-08-24 06:08:38 +00:00
import noopAll from "noop" /* 19 */;
2026-09-02 09:53:35 +00:00
import ThemesDefault from "Themes" /* 709 */;
import useCanCurrentUserSpeakInChannelDefault from "useCanCurrentUserSpeakInChannel" /* 9564 */;
import useIsInvitedToSpeakDefault from "useIsInvitedToSpeak" /* 9660 */;
import useVoiceStateForRemoteSessionDefault from "useVoiceStateForRemoteSession" /* 9663 */;
2026-08-24 06:08:38 +00:00
import { View } from "get ActivityIndicator" /* 17 */;
2026-09-02 09:53:35 +00:00
import closure_4 from "ensureGuildLoaded" /* 1386 */;
import closure_5 from "createGuildRecordFromRust" /* 1908 */;
2026-09-01 10:26:29 +00:00
import closure_6 from "createRTCConnection" /* 4554 */;
import closure_7 from "handleUpdate" /* 4496 */;
2026-09-02 09:53:35 +00:00
import { RTC_PANEL_HEIGHT } from "RTC_PANEL_HEIGHT" /* 9662 */;
import { RTCConnectionStates } from "ME" /* 673 */;
2026-08-24 06:08:38 +00:00
import jsxProd from "jsxProd" /* 21 */;
2026-09-01 10:26:29 +00:00
import createCacheKey from "createCacheKey" /* 4478 */;
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;
2026-09-02 09:53:35 +00:00
let obj = _require(586);
2026-08-24 06:08:38 +00:00
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-09-02 09:53:35 +00:00
let tmp5Result = tmp5(1362);
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-09-02 09:53:35 +00:00
tmp5Result = tmp5(5079);
2026-07-29 08:29:29 +00:00
let isScreenLandscape = tmp5Result.useIsScreenLandscape();
2026-07-20 16:05:17 +00:00
if (isScreenLandscape) {
2026-09-02 09:53:35 +00:00
isScreenLandscape = tmp5(4332).isModalOpen(tmp2(9539));
2026-09-01 10:26:29 +00:00
const tmp5Result1 = tmp5(4332);
2026-07-20 16:05:17 +00:00
}
if (isScreenLandscape) {
2026-09-02 09:53:35 +00:00
isScreenLandscape = tmp5(1234).isAndroid();
const tmp5Result2 = tmp5(1234);
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-09-02 09:53:35 +00:00
num = tmp2(1627)().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-09-02 09:53:35 +00:00
isScreenLandscape = callback(tmp2(9543), { 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-09-02 09:53:35 +00:00
tmp19 = callback(tmp2(9669), 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
};