decord/source/components_native/ChannelContainer.tsx

132 lines
4.2 KiB
TypeScript
Raw Normal View History

2026-08-13 07:00:46 +00:00
// Module ID: 9799
// Function ID: 9800
2026-07-20 16:05:17 +00:00
// Name: NotificationsContainer
2026-08-13 07:00:46 +00:00
// Dependencies: [19, 17, 3990, 1391, 1979, 676, 1388, 21, 4342, 4200, 9800, 589, 10254, 8902, 4164, 1377, 10255, 10256, 10272, 2]
2026-07-20 16:05:17 +00:00
// Exports: ChannelContainer
2026-08-13 07:00:46 +00:00
// Module 9799 (NotificationsContainer)
2026-07-29 08:29:29 +00:00
import set from "set";
import { View } from "AnnouncementChannelLurkerBar";
import initialize from "initialize";
import ensureGuildLoaded from "ensureGuildLoaded";
import handleConnectionOpen from "handleConnectionOpen";
2026-07-23 10:11:24 +00:00
import { ChannelTypes } from "ME";
import { ContentDismissActionType } from "ContentDismissActionType";
import jsxProd from "jsxProd";
2026-07-29 08:29:29 +00:00
import createCacheKey from "createCacheKey";
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
let c10;
let unpackModuleId;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-20 16:05:17 +00:00
function NotificationsContainer() {
2026-07-29 08:29:29 +00:00
let tmp4 = null;
2026-08-13 07:00:46 +00:00
if (importDefault(4200)().isChatBesideChannelList) {
2026-07-29 08:29:29 +00:00
const obj = { style: null, children: null };
obj[0] = tmp.container;
2026-08-13 07:00:46 +00:00
obj[1] = callback(importDefault(9800), {});
2026-07-29 08:29:29 +00:00
tmp4 = callback(View, obj);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp4;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
({ jsx: c10, jsxs: unpackModuleId } = jsxProd);
let closure_12 = createCacheKey.createStyles({ container: { position: "absolute", left: 0, right: 0, backgroundColor: "transparent", marginTop: 8 } });
let result = require("initialize").fileFinishedImporting("components_native/ChannelContainer.tsx");
2026-07-20 16:05:17 +00:00
export const ChannelContainer = function ChannelContainer(children) {
2026-07-29 08:29:29 +00:00
let channel;
2026-07-20 16:05:17 +00:00
let channelId;
let isStageChannel;
2026-07-23 10:11:24 +00:00
let require;
({ guildId: require, channelId } = children);
2026-07-20 16:05:17 +00:00
let dependencyMap;
let React;
2026-07-23 10:11:24 +00:00
let c4;
2026-07-29 08:29:29 +00:00
let obj = require(589) /* initialize */;
const items = [handleConnectionOpen, ensureGuildLoaded];
2026-07-20 16:05:17 +00:00
const stateFromStoresObject = obj.useStateFromStoresObject(items, () => {
2026-07-23 10:11:24 +00:00
const voiceChannelId = outer1_7.getVoiceChannelId();
2026-07-29 08:29:29 +00:00
const obj = { channel: outer1_6.getChannel(channelId), voiceChannelId, isStageChannel: null };
2026-07-23 10:11:24 +00:00
const channel = outer1_6.getChannel(voiceChannelId);
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();
}
2026-07-29 08:29:29 +00:00
obj[2] = Boolean(isGuildStageVoiceResult);
2026-07-20 16:05:17 +00:00
return obj;
});
2026-07-29 08:29:29 +00:00
({ channel, isStageChannel } = stateFromStoresObject);
let tmp5 = !isStageChannel;
if (isStageChannel) {
2026-08-13 07:00:46 +00:00
tmp5 = channelId(10254)(stateFromStoresObject.voiceChannelId);
2026-07-29 08:29:29 +00:00
}
let tmpResult = tmp(589);
const items1 = [initialize];
2026-07-20 16:05:17 +00:00
let isPrivateResult = null != channel;
2026-07-29 08:29:29 +00:00
const stateFromStores = tmpResult.useStateFromStores(items1, () => {
2026-07-20 16:05:17 +00:00
let isLurkingResult = null != closure_0;
if (isLurkingResult) {
2026-07-29 08:29:29 +00:00
isLurkingResult = outer1_5.isLurking(tmp);
2026-07-20 16:05:17 +00:00
}
return isLurkingResult;
});
if (isPrivateResult) {
isPrivateResult = channel.isPrivate();
}
dependencyMap = isPrivateResult;
2026-08-13 07:00:46 +00:00
const tmp8 = channelId(8902)(isPrivateResult);
2026-07-29 08:29:29 +00:00
React = tmp8;
2026-08-13 07:00:46 +00:00
const tmp9 = channelId(8902)(channelId);
2026-07-29 08:29:29 +00:00
c4 = tmp9;
const items2 = [channelId, tmp9, isPrivateResult, tmp8];
2026-07-20 16:05:17 +00:00
const effect = React.useEffect(() => {
2026-07-23 10:11:24 +00:00
let tmp = c3;
2026-07-29 08:29:29 +00:00
let tmp2 = c3;
2026-07-23 10:11:24 +00:00
if (c3) {
2026-07-29 08:29:29 +00:00
tmp2 = !_undefined;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (!tmp2) {
if (tmp) {
tmp = _undefined;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (tmp) {
tmp = channelId !== c4;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp2 = tmp;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (tmp2) {
2026-07-23 10:11:24 +00:00
let obj = outer1_0(_undefined[14]);
2026-07-29 08:29:29 +00:00
obj = { dismissAction: null };
obj[0] = outer1_9.AUTO;
2026-07-23 10:11:24 +00:00
const result = obj.UNSAFE_markDismissibleContentAsDismissed(outer1_0(_undefined[15]).DismissibleContent.ACTIVITY_GDM_CALL_TOOLTIP, obj);
2026-07-20 16:05:17 +00:00
}
}, items2);
2026-08-13 07:00:46 +00:00
tmpResult = tmp(10255);
2026-07-29 08:29:29 +00:00
const channelStyles = tmpResult.useChannelStyles();
obj = { style: channelStyles.scene, children: null };
obj = { style: channelStyles.flex, children: null };
2026-07-20 16:05:17 +00:00
let type;
2026-07-29 08:29:29 +00:00
if (channel != null) {
2026-07-20 16:05:17 +00:00
type = channel.type;
}
2026-07-29 08:29:29 +00:00
let tmp15 = null;
2026-07-20 16:05:17 +00:00
if (type === ChannelTypes.GUILD_ANNOUNCEMENT) {
2026-07-29 08:29:29 +00:00
tmp15 = null;
2026-07-20 16:05:17 +00:00
if (stateFromStores) {
2026-07-29 08:29:29 +00:00
const obj1 = { channel: null };
obj1[0] = channel;
2026-08-13 07:00:46 +00:00
tmp15 = callback(tmp4(10256), obj1);
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
const items3 = [tmp15, children.children, ];
if (tmp5) {
const obj2 = { style: null };
obj2[0] = channelStyles.callPTTButton;
2026-08-13 07:00:46 +00:00
tmp5 = callback(tmp4(10272), obj2);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
items3[2] = tmp5;
obj[1] = items3;
2026-07-23 10:11:24 +00:00
const items4 = [closure_11(c4, obj), callback(NotificationsContainer, {})];
2026-07-29 08:29:29 +00:00
obj[1] = items4;
2026-07-23 10:11:24 +00:00
return closure_11(c4, obj);
2026-07-20 16:05:17 +00:00
};