This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

@@ -1,131 +1,162 @@
/* Metro module 15340; source: modules/launchpad/native/shared/TextChannel.tsx; dependencies: [31, 27, 5071, 1949, 1379, 1309, 4865, 33, 4501, 15332, 697, 14436, 6860, 566, 4805, 9619, 13775, 5087, 4584, 15341, 6632, 11600, 10975, 3834, 15343, 8448, 14700, 15333, 5278, 15344, 15345, 15336, 15339, 2] */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import LocaleStore from '../../../user_settings/LocaleStore.tsx'; /* Metro dependency 1949 */
import ActiveJoinedThreadsStore from '../../../threads/ActiveJoinedThreadsStore.tsx'; /* Metro dependency 5071 */
import UseChannelRoleSubscriptionStatus from '../../../guild_role_subscriptions/useChannelRoleSubscriptionStatus.tsx'; /* Metro dependency 6632 */
import UseEmbeddedAppsForChannel from '../../../activities/useEmbeddedAppsForChannel.tsx'; /* Metro dependency 11600 */
import RenderChannelPressableWrapper from './renderChannelPressableWrapper.tsx'; /* Metro dependency 15333 */
import UsePressUnderlayColor from '../../../main_tabs_v2/native/shared_components/util/usePressUnderlayColor.tsx'; /* Metro dependency 15341 */
import RenderChannelItem from './renderChannelItem.tsx'; /* Metro dependency 15345 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as FormConstantsModule from '../../../../design/void/Form/native/FormConstants.tsx'; /* Metro dependency 1309 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as UseFontScaleModule from '../../../screen/native/useFontScale.tsx'; /* Metro dependency 4584 */
import * as ReadStateConstantsModule from '../../../read_states/ReadStateConstants.tsx'; /* Metro dependency 4865 */
import * as SpoilerChannelUtilsModule from '../../../spoiler_channels/SpoilerChannelUtils.tsx'; /* Metro dependency 5087 */
import * as PressablesModule from '../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as ThreadHooksModule from '../../../threads/ThreadHooks.tsx'; /* Metro dependency 6860 */
import * as ActivitiesInTextUtilsModule from '../../../activities/ActivitiesInTextUtils.tsx'; /* Metro dependency 8448 */
import * as ForumHooksModule from '../../../forums/ForumHooks.tsx'; /* Metro dependency 9619 */
import * as UseChannelUnreadBadgeStateModule from './useChannelUnreadBadgeState.tsx'; /* Metro dependency 14436 */
import * as UseTextChannelPressEventsModule from '../../../main_tabs_v2/native/shared_components/guild_channels/useTextChannelPressEvents.tsx'; /* Metro dependency 15344 */
import * as RenderChannelItemModule from './renderChannelItem.tsx'; /* Metro dependency 15345 */
function _fun117274(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15537:6, offset: 0x024acabe, size: 307 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const activeJoinedThreadsStore = importDefault(5071) /* metro dependency 5071: ActiveJoinedThreadsStore */;
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_8 = (require(1309) /* metro dependency 1309: FormConstants */).getThemedRippleConfig;
const env0_9 = (require(4865) /* metro dependency 4865: ReadStateConstants */).UnreadSetting;
const value2 = require(33) /* metro dependency 33 */;
const env0_10 = value2.jsx;
const env0_11 = value2.jsxs;
const env0_12 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun117275);
let value = ReactModule;
const env0_12 = (CreateStylesModule).createStyles(_fun117275);
value = value.memo(TextChannel);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/launchpad/native/shared/TextChannel.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/launchpad/native/shared/TextChannel.tsx');
exports.default = value;
}
function _fun117275() { // fn#117275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15537:258, offset: 0x024acbf1, size: 194 bytes, params: 1, frame: 15
const object = {};
const object2 = {'flex': 1, 'borderRadius': null, 'marginBottom': 1};
object2.borderRadius = (importDefault(15332) /* metro dependency 15332: getLayoutStyles */)().container.borderRadius;
object.pressable = object2;
const object3 = {'position': 'absolute', 'top': 0, 'bottom': 0, 'left': 0, 'right': 0, 'borderWidth': 1};
const BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
object3.borderColor = BORDER_MUTED;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object.selectedBorder = object3;
const object4 = {};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
object4.backgroundColor = BACKGROUND_MOD_MUTED;
object.rowSelected = object4;
return object;
}
function _fun117275() { // fn#117275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15537:258, offset: 0x024acbf1, size: 194 bytes, params: 1, frame: 15
const object5 = {};
const object6 = {'flex': 1, 'borderRadius': null, 'marginBottom': 1};
object6.borderRadius = (importDefault(15332) /* metro dependency 15332: getLayoutStyles */)().container.borderRadius;
object5.pressable = object6;
const object7 = {'position': 'absolute', 'top': 0, 'bottom': 0, 'left': 0, 'right': 0, 'borderWidth': 1};
const BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
object7.borderColor = BORDER_MUTED;
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object5.selectedBorder = object7;
const object8 = {};
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
object8.backgroundColor = BACKGROUND_MOD_MUTED;
object5.rowSelected = object8;
return object5;
}
function TextChannel({channel, subtitle, muted, navigationReplace, showGuildBadgeIcon, selected}) { // fn#117276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15537:613, offset: 0x024accb3, size: 1341 bytes, params: 2, frame: 47
var r33;
var moduleValue9;
muted = !(muted === undefined) && muted;
navigationReplace = !(navigationReplace === undefined) && navigationReplace;
selected = !(selected === undefined) && selected;
const id = channel.id;
const isForumLikeChannel2 = channel.isForumLikeChannel();
const guild_id = channel.guild_id;
const {newChannel, optInEnabled, unread, resolvedUnreadSetting, mentionCount,
isMentionLowImportance} = (UseChannelUnreadBadgeStateModule).useChannelUnreadBadgeState(channel,
muted);
const styles = useStyles(muted, unread);
const useHasActiveThreads = ThreadHooksModule.useHasActiveThreads;
const hasActiveThreads = Reflect.apply(useHasActiveThreads, ThreadHooksModule, [channel]).hasActiveThreads;
let useStateFromStores = FluxModule.useStateFromStores;
const newThreadCount = Reflect.apply(useStateFromStores, FluxModule, [[ActiveJoinedThreadsStore], function() {
var activeJoinedThreadsStoreBinding = ActiveJoinedThreadsStore;
var channelBinding = channel;
return activeJoinedThreadsStoreBinding.getNewThreadCount(channelBinding.guild_id, channelBinding.id);
}]);
useStateFromStores = FluxModule.useStateFromStores;
const r34 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(Reflect.apply(useStateFromStores,
FluxModule, [[ChannelStore], function() {
return ChannelStore.getChannel(channel.parent_id);
}])) ?? undefined;
const value9 = (ForumHooksModule).useUnreadThreadsCountForParent(channel.guild_id,
channel.id);
const value11 = (importDefault(13775) /* metro dependency 13775: useMessagePreviews */)(channel,
{unread: unread && !muted});
const value12 = (SpoilerChannelUtilsModule).useIsChannelSpoilerGated(channel);
const value13 = (UseFontScaleModule).useFontScale();
const locale = FluxModule.useStateFromStores([LocaleStore], function() {
return LocaleStore.locale;
});
const value14 = (UsePressUnderlayColor)();
const {isSubscriptionGated,
needSubscriptionToAccess} = (UseChannelRoleSubscriptionStatus)(channel.id);
const value16 = (UseEmbeddedAppsForChannel)(channel);
if (value11 == null) {
moduleValue9 = require(15343) /* metro dependency 15343: ChannelSubtitle */;
r33 = moduleValue9.renderChannelSubtitle({subtitle: subtitle, muted: muted, channelId: id, guildId: guild_id});
} else if (value12) {
moduleValue9 = require(15343) /* metro dependency 15343: ChannelSubtitle */;
r33 = moduleValue9.renderChannelSubtitle({subtitle: subtitle, muted: muted, channelId: id, guildId: guild_id});
} else {
const ChannelRowPreview = (require(10975) /* metro dependency 10975: ChannelRowPreview */).ChannelRowPreview;
r33 = (
<ChannelRowPreview
channel={channel}
message={value11}
color="text-muted"
muted={muted}
layout={(require(3834) /* metro dependency 3834: ChannelListLayoutTypes */).ChannelListLayoutTypes.COMPACT}
/>
);
}
const value19 = (ActivitiesInTextUtilsModule).useIsActivitiesInTextEnabled(channel.id);
const value21 = env0_3.useMemo(_fun117280, [value16.length > 0, value16]);
const defaultImport3 = RenderChannelPressableWrapper;
const PressableHighlight = (PressablesModule).PressableHighlight;
const pressableHighlightProps = {style: [styles.pressable, selected ? styles.rowSelected : undefined],
underlayColor: value14, androidRippleConfig: getThemedRippleConfig({color: value14})};
const useTextChannelPressEvents = UseTextChannelPressEventsModule.useTextChannelPressEvents;
copyDataProperties(pressableHighlightProps, Reflect.apply(useTextChannelPressEvents,
UseTextChannelPressEventsModule, [channel, navigationReplace]), undefined);
const getChannelAccessibilityProps = RenderChannelItemModule.getChannelAccessibilityProps;
copyDataProperties(pressableHighlightProps, Reflect.apply(getChannelAccessibilityProps, RenderChannelItemModule,
[{channel: channel, unread: unread, mentionCount: mentionCount}]), undefined);
const items2 = [
selected && <View style={styles.selectedBorder} pointerEvents="none" />,
];
const defaultImport4 = RenderChannelItem;
const object = {channel: channel, channelCategoryName: r34, subtitle: r33, hasActiveThreads: hasActiveThreads};
object.unreadBadge = ((Component) => <Component unread={unread} resolvedUnreadSetting={resolvedUnreadSetting} muted={muted} />)(importDefault(15336) /* metro dependency 15336: UnreadBadge */);
object.mentionBadge = (importDefault(15339) /* metro dependency 15339: renderChannelBadge */)({newChannel: newChannel && optInEnabled,
mentionCount: mentionCount, isMentionLowImportance: isMentionLowImportance,
postsWithUnreadsCount: isForumLikeChannel2 && value9 > 0 ? muted || resolvedUnreadSetting !== UnreadSetting.ALL_MESSAGES ? undefined : value9 : undefined,
newPostCount: isForumLikeChannel2 && value9 > 0 ? muted ? undefined : newThreadCount : undefined,
locale: locale});
object.unread = unread;
object.resolvedUnreadSetting = resolvedUnreadSetting;
object.mentionCount = mentionCount;
object.muted = muted;
object.channelName = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel);
object.fontScale = value13;
object.isSubscriptionGated = isSubscriptionGated;
object.needSubscriptionToAccess = needSubscriptionToAccess;
object.showGuildBadgeIcon = showGuildBadgeIcon;
object.end = value19 ? value21 : null;
items2[1] = defaultImport4(object);
return defaultImport3(<PressableHighlight {...pressableHighlightProps}>{items2}</PressableHighlight>);
function _fun117280() { // fn#117280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15537:1764, offset: 0x024ad238, size: 60 bytes, params: 1, frame: 15
return (
env0_2
? ((Component) => <Component embeddedApps={env0_1} />)(importDefault(14700) /* metro dependency 14700: ChannelItemEmbeddedActivities */)
: null
);
}
function TextChannel({channel, subtitle, muted, navigationReplace, showGuildBadgeIcon, selected}) { // fn#117276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15537:613, offset: 0x024accb3, size: 1341 bytes, params: 2, frame: 47
var r33;
var moduleValue9;
muted = !(muted === undefined) && muted;
navigationReplace = !(navigationReplace === undefined) && navigationReplace;
selected = !(selected === undefined) && selected;
const id = channel.id;
const isForumLikeChannel2 = channel.isForumLikeChannel();
const guild_id = channel.guild_id;
const {newChannel, optInEnabled, unread, resolvedUnreadSetting, mentionCount,
isMentionLowImportance} = (require(14436) /* metro dependency 14436: useChannelUnreadBadgeState */).useChannelUnreadBadgeState(channel,
muted);
const styles = useStyles(muted, unread);
const threadHooksModule = require(6860) /* metro dependency 6860: ThreadHooks */;
const useHasActiveThreads = threadHooksModule.useHasActiveThreads;
const hasActiveThreads = Reflect.apply(useHasActiveThreads, threadHooksModule, [channel]).hasActiveThreads;
const fluxModule = require(566) /* metro dependency 566: flux */;
let useStateFromStores = fluxModule.useStateFromStores;
const newThreadCount = Reflect.apply(useStateFromStores, fluxModule, [[ActiveJoinedThreadsStore], function() {
var channelBinding = channel;
return ActiveJoinedThreadsStore.getNewThreadCount(channelBinding.guild_id, channelBinding.id);
}]);
const moduleValue4 = fluxModule;
useStateFromStores = moduleValue4.useStateFromStores;
const r34 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(Reflect.apply(useStateFromStores,
moduleValue4, [[ChannelStore], function() {
return ChannelStore.getChannel(channel.parent_id);
}])) ?? undefined;
const value9 = (require(9619) /* metro dependency 9619: ForumHooks */).useUnreadThreadsCountForParent(channel.guild_id,
channel.id);
const value11 = (importDefault(13775) /* metro dependency 13775: useMessagePreviews */)(channel,
{unread: unread && !muted});
const value12 = (require(5087) /* metro dependency 5087: SpoilerChannelUtils */).useIsChannelSpoilerGated(channel);
const value13 = (require(4584) /* metro dependency 4584: useFontScale */).useFontScale();
const locale = fluxModule.useStateFromStores([LocaleStore], function() {
return LocaleStore.locale;
});
const value14 = (importDefault(15341) /* metro dependency 15341: usePressUnderlayColor */)();
const {isSubscriptionGated,
needSubscriptionToAccess} = (importDefault(6632) /* metro dependency 6632: useChannelRoleSubscriptionStatus */)(channel.id);
const value16 = (importDefault(11600) /* metro dependency 11600: useEmbeddedAppsForChannel */)(channel);
if (value11 == null) {
moduleValue9 = require(15343) /* metro dependency 15343: ChannelSubtitle */;
r33 = moduleValue9.renderChannelSubtitle({subtitle: subtitle, muted: muted, channelId: id, guildId: guild_id});
} else if (value12) {
moduleValue9 = require(15343) /* metro dependency 15343: ChannelSubtitle */;
r33 = moduleValue9.renderChannelSubtitle({subtitle: subtitle, muted: muted, channelId: id, guildId: guild_id});
} else {
const ChannelRowPreview = (require(10975) /* metro dependency 10975: ChannelRowPreview */).ChannelRowPreview;
r33 = <ChannelRowPreview channel={channel} message={value11} color="text-muted" muted={muted} layout={(require(3834) /* metro dependency 3834: ChannelListLayoutTypes */).ChannelListLayoutTypes.COMPACT} />;
}
const value19 = (require(8448) /* metro dependency 8448: ActivitiesInTextUtils */).useIsActivitiesInTextEnabled(channel.id);
const value21 = env0_3.useMemo(_fun117280, [value16.length > 0, value16]);
const defaultImport3 = importDefault(15333) /* metro dependency 15333: renderChannelPressableWrapper */;
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
const pressableHighlightProps = {style: [styles.pressable, selected ? styles.rowSelected : undefined],
underlayColor: value14, androidRippleConfig: getThemedRippleConfig({color: value14})};
const useTextChannelPressEventsModule = require(15344) /* metro dependency 15344: useTextChannelPressEvents */;
const useTextChannelPressEvents = useTextChannelPressEventsModule.useTextChannelPressEvents;
copyDataProperties(pressableHighlightProps, Reflect.apply(useTextChannelPressEvents,
useTextChannelPressEventsModule, [channel, navigationReplace]), undefined);
const renderChannelItemModule = require(15345) /* metro dependency 15345: renderChannelItem */;
const getChannelAccessibilityProps = renderChannelItemModule.getChannelAccessibilityProps;
copyDataProperties(pressableHighlightProps, Reflect.apply(getChannelAccessibilityProps, renderChannelItemModule,
[{channel: channel, unread: unread, mentionCount: mentionCount}]), undefined);
const items2 = [selected && <View style={styles.selectedBorder} pointerEvents="none" />];
const defaultImport4 = importDefault(15345) /* metro dependency 15345: renderChannelItem */;
const object = {channel: channel, channelCategoryName: r34, subtitle: r33, hasActiveThreads: hasActiveThreads};
object.unreadBadge = ((Component) => <Component unread={unread} resolvedUnreadSetting={resolvedUnreadSetting} muted={muted} />)(importDefault(15336) /* metro dependency 15336: UnreadBadge */);
object.mentionBadge = (importDefault(15339) /* metro dependency 15339: renderChannelBadge */)({newChannel: newChannel && optInEnabled,
mentionCount: mentionCount, isMentionLowImportance: isMentionLowImportance,
postsWithUnreadsCount: isForumLikeChannel2 && value9 > 0 ? muted || resolvedUnreadSetting !== UnreadSetting.ALL_MESSAGES ? undefined : value9 : undefined,
newPostCount: isForumLikeChannel2 && value9 > 0 ? muted ? undefined : newThreadCount : undefined,
locale: locale});
object.unread = unread;
object.resolvedUnreadSetting = resolvedUnreadSetting;
object.mentionCount = mentionCount;
object.muted = muted;
object.channelName = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel);
object.fontScale = value13;
object.isSubscriptionGated = isSubscriptionGated;
object.needSubscriptionToAccess = needSubscriptionToAccess;
object.showGuildBadgeIcon = showGuildBadgeIcon;
object.end = value19 ? value21 : null;
items2[1] = defaultImport4(object);
return defaultImport3(<PressableHighlight {...pressableHighlightProps}>{items2}</PressableHighlight>);
}
function _fun117280() { // fn#117280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15537:1764, offset: 0x024ad238, size: 60 bytes, params: 1, frame: 15
return env0_2 ? ((Component) => <Component embeddedApps={env0_1} />)(importDefault(14700) /* metro dependency 14700: ChannelItemEmbeddedActivities */) : null;
}
global.__d(_fun117274, 15340, [31, 27, 5071, 1949, 1379, 1309, 4865, 33, 4501, 15332, 697, 14436, 6860, 566, 4805,
9619, 13775, 5087, 4584, 15341, 6632, 11600, 10975, 3834, 15343, 8448, 14700, 15333, 5278, 15344, 15345, 15336,
15339,
2]) /* metro module 15340, dependencies: [31, 27, 5071, 1949, 1379, 1309, 4865, 33, 4501, 15332, 697, 14436, 6860, 566, 4805, 9619, 13775, 5087, 4584, 15341, 6632, 11600, 10975, 3834, 15343, 8448, 14700, 15333, 5278, 15344, 15345, 15336, 15339, 2] */;