decord/source/modules/launchpad/native/shared/ChannelSubtitle.tsx
github-actions 03cf168fbc chore: update source for alpha 347.3
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4825.js (118.4 MB)
2026-09-17 08:17:09 +00:00

69 lines
2.4 KiB
TypeScript

// Module ID: 17234
// Function ID: 17235
// Name: ChannelSubtitle
// Dependencies: [19, 10267, 21, 16906, 4636, 16386, 10265, 2]
// Exports: renderChannelSubtitle
// Module 17234 (ChannelSubtitle)
import Text_Text from "Text/Text" /* 4636 */;
import getChannelSubtitleData from "getChannelSubtitleData" /* 16386 */;
import getLayoutStylesDefault from "getLayoutStyles" /* 16906 */;
import noop from "module_19" /* 19 */;
require = fn;
function ChannelSubtitle(arg0) {
({ muted, textProps } = arg0);
({ connected, channelId, guildId, subtitle } = arg0);
const channelSubtitleData = getChannelSubtitleData.getChannelSubtitleData(subtitle);
if (null == channelSubtitleData) {
return null;
} else {
const obj2 = {};
const merged = Object.assign(textProps);
const obj3 = { content: channelSubtitleData.subtitle, muted: null, channelId: null, guildId: null, disableAnimatedEmoji: null, color: null };
let flag = muted;
if (muted == null) {
flag = false;
}
obj3.muted = flag;
obj3.channelId = channelId;
obj3.guildId = guildId;
obj3.disableAnimatedEmoji = !("voice" === channelSubtitleData.type && connected);
let str = "text-subtle";
if (muted) {
str = "text-muted";
}
obj3.color = str;
obj2.children = tmp(10265).renderMessagePreviewMarkup(obj3);
return jsx(tmp(4636).Text, {});
}
}
const SUBTITLE_OPACITY_NORMAL = fn(10267).SUBTITLE_OPACITY_NORMAL;
const jsx = fn(21).jsx;
const size = fn(2);
const result = size.fileFinishedImporting("modules/launchpad/native/shared/ChannelSubtitle.tsx");
export const renderChannelSubtitle = function renderChannelSubtitle(arg0) {
({ subtitle, muted } = arg0);
if (null == subtitle) {
return null;
} else {
const obj2 = { variant: getLayoutStylesDefault().messagePreview.text.variant, color: "text-muted", lineClamp: 1, maxFontSizeMultiplier: 1.75, style: null };
let num = 1;
if (!muted) {
num = SUBTITLE_OPACITY_NORMAL;
}
const obj = { opacity: num };
obj2.style = obj;
if (typeof subtitle === "string") {
const obj3 = {};
const merged = Object.assign(obj2);
obj3.children = subtitle;
let tmp9 = jsx(Text_Text.Text, {});
} else {
const obj4 = { channelId: tmp, guildId: tmp2, subtitle, muted, connected: tmp3, textProps: obj2 };
tmp9 = <ChannelSubtitle channelId={tmp} guildId={tmp2} subtitle={subtitle} muted={muted} connected={tmp3} textProps={obj2} />;
}
return tmp9;
}
};