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,47 +1,56 @@
/* Metro module 15178; source: modules/threads/native/components/ThreadAutoArchiveBottomSheet.tsx; dependencies: [31, 1386, 33, 7878, 7988, 1244, 7987, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
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 IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ChannelConstantsModule from '../../../channel/ChannelConstants.tsx'; /* Metro dependency 1386 */
import * as ThreadAutoArchiveModule from '../../ThreadAutoArchive.tsx'; /* Metro dependency 7878 */
import * as TableRadioRowNativeModule from '../../../../design/components/TableRow/native/TableRadioRow.native.tsx'; /* Metro dependency 7987 */
import * as TableRadioGroupNativeModule from '../../../../design/components/TableRow/native/TableRadioGroup.native.tsx'; /* Metro dependency 7988 */
function _fun115954(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15375:6, offset: 0x02475b52, size: 163 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_2 = (require(1386) /* metro dependency 1386: ChannelConstants */).ChannelFlags;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
value = value.memo(_fun115955);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/threads/native/components/ThreadAutoArchiveBottomSheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/threads/native/components/ThreadAutoArchiveBottomSheet.tsx');
exports.AutoArchiveDurationOptions = value;
function _fun115955({title, description, channel, selected, onSelectDuration}) { // fn#115955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15375:153, offset: 0x02475bf5, size: 256 bytes, params: 2, frame: 21
const autoArchiveOptions = (ThreadAutoArchiveModule).getAutoArchiveOptions();
const env0_0 = channel != null && channel.isForumPost() && channel.hasFlag(ChannelFlags.PINNED);
const TableRadioGroup = (TableRadioGroupNativeModule).TableRadioGroup;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const H4mGfI = (IndexNativeModule).t.H4mGfI;
return (
<TableRadioGroup
value={selected}
title={title}
description={description}
accessibilityLabel={Reflect.apply(string, intl, [H4mGfI])}
onChange={onSelectDuration}
hasIcons={false}
>
{autoArchiveOptions.map(_fun115956)}
</TableRadioGroup>
);
function _fun115956(a0) { // fn#115956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15375:473, offset: 0x02475cf5, size: 83 bytes, params: 2, frame: 16
const value = environment.__proto__;
const TableRadioRow = (TableRadioRowNativeModule).TableRadioRow;
return (
<TableRadioRow
value={a0.value}
disabled={env0_0}
label={a0.label}
key={a0.value}
/>
);
}
}
}
function _fun115955({title, description, channel, selected, onSelectDuration}) { // fn#115955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15375:153, offset: 0x02475bf5, size: 256 bytes, params: 2, frame: 21
const autoArchiveOptions = (require(7878) /* metro dependency 7878: ThreadAutoArchive */).getAutoArchiveOptions();
const env0_0 = channel != null && channel.isForumPost() && channel.hasFlag(ChannelFlags.PINNED);
const TableRadioGroup = (require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const H4mGfI = (require(1244) /* metro dependency 1244: indexNative */).t.H4mGfI;
return (
<TableRadioGroup
value={selected}
title={title}
description={description}
accessibilityLabel={Reflect.apply(string, intl, [H4mGfI])}
onChange={onSelectDuration}
hasIcons={false}
>
{autoArchiveOptions.map(_fun115956)}
</TableRadioGroup>
);
}
function _fun115956(a0) { // fn#115956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15375:473, offset: 0x02475cf5, size: 83 bytes, params: 2, frame: 16
const value = environment.__proto__;
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
return (
<TableRadioRow
value={a0.value}
disabled={env0_0}
label={a0.label}
key={a0.value}
/>
);
}
global.__d(_fun115954, 15178, [31, 1386, 33, 7878, 7988, 1244, 7987,
2]) /* metro module 15178, dependencies: [31, 1386, 33, 7878, 7988, 1244, 7987, 2] */;
@@ -1,248 +1,282 @@
/* Metro module 15097; source: modules/threads/native/components/ThreadBrowserRowSubtext.tsx; dependencies: [31, 27, 4502, 1945, 1878, 6898, 661, 482, 33, 4501, 697, 566, 7169, 6630, 6593, 4573, 1244, 3995, 6902, 4634, 21, 1305, 8349, 8206, 4020, 2] */
import SnowflakeUtils from '../../../../utils/SnowflakeUtils.tsx'; /* Metro dependency 21 */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import GuildMemberStore from '../../../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
import AccessibilityStore from '../../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import UseMessageAuthor from '../../../messages/useMessageAuthor.tsx'; /* Metro dependency 4634 */
import UseHasEnhancedRoleColors from '../../../premium/powerups/hooks/useHasEnhancedRoleColors.tsx'; /* Metro dependency 6630 */
import ThreadMessageStore from '../../ThreadMessageStore.tsx'; /* Metro dependency 6898 */
import RenderMessageMarkup from '../../../messages/renderMessageMarkup.tsx'; /* Metro dependency 8349 */
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 ConstantsModule from '../../../../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */
import * as ConstantsModule2 from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as FabricUtilsModule from '../../../../utils/native/FabricUtils.tsx'; /* Metro dependency 4020 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as SubscribeGuildMembersModule from '../../../../lib/guild/subscribeGuildMembers.tsx'; /* Metro dependency 6902 */
import * as ThreadUtilsModule from '../../ThreadUtils.tsx'; /* Metro dependency 7169 */
import * as EnhancedRoleColorUtilsModule from '../../../premium/enhanced_role_colors/native/EnhancedRoleColorUtils.tsx'; /* Metro dependency 8206 */
function _fun114222(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15294:6, offset: 0x02418455, size: 543 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const threadMessageStore = importDefault(6898) /* metro dependency 6898: ThreadMessageStore */;
const MessageTypes = (require(661) /* metro dependency 661: Constants */).MessageTypes;
const Fonts = (require(482) /* metro dependency 482: Constants */).Fonts;
const value2 = require(33) /* metro dependency 33 */;
const env0_9 = value2.jsx;
const env0_10 = value2.jsxs;
const env0_11 = value2.Fragment;
const MessageTypes = (ConstantsModule2).MessageTypes;
const Fonts = (ConstantsModule).Fonts;
const CHANNEL_NAME_CHANGE = MessageTypes.CHANNEL_NAME_CHANGE;
object = [CHANNEL_NAME_CHANGE];
const THREAD_STARTER_MESSAGE = MessageTypes.THREAD_STARTER_MESSAGE;
object[1] = THREAD_STARTER_MESSAGE;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const createStyles = CreateStylesModule.createStyles;
object = {};
object.row = {flexDirection: 'row'};
object.subtextContent = {'lineHeight': 18, 'flexShrink': 1};
object.timestamp = {lineHeight: 18};
const object2 = {'fontSize': 14, 'lineHeight': 18};
const object3 = {'fontSize': 14, 'lineHeight': 18};
const PRIMARY_SEMIBOLD = Fonts.PRIMARY_SEMIBOLD;
object2.fontFamily = PRIMARY_SEMIBOLD;
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
object2.color = TEXT_SUBTLE;
object.username = object2;
const BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
object3.fontFamily = PRIMARY_SEMIBOLD;
const TEXT_SUBTLE = (Native).colors.TEXT_SUBTLE;
object3.color = TEXT_SUBTLE;
object.username = object3;
const BACKGROUND_MOD_STRONG = (Native).colors.BACKGROUND_MOD_STRONG;
object.dividerDot = {'width': 4, 'height': 4, 'marginHorizontal': 4, 'borderRadius': 2, 'backgroundColor': null,
'alignSelf': 'center', backgroundColor: BACKGROUND_MOD_STRONG};
const env0_13 = Reflect.apply(createStyles, createStylesModule, [object]);
const env0_14 = value.memo(_fun114231);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/threads/native/components/ThreadBrowserRowSubtext.tsx');
const env0_13 = Reflect.apply(createStyles, CreateStylesModule, [object]);
const env0_14 = ReactModule.memo(_fun114231);
(FileImportTrackerModule).fileFinishedImporting('modules/threads/native/components/ThreadBrowserRowSubtext.tsx');
exports.ThreadSubtext = ThreadSubtext;
}
function MessageContent({thread, message}) { // fn#114223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15294:1751, offset: 0x02418674, size: 511 bytes, params: 2, frame: 23
const styles = useStyles();
(require(6902) /* metro dependency 6902: subscribeGuildMembers */).useSubscribeGuildMembers({[thread.guild_id]: [message.author.id]},
'ThreadBrowserRowSubtext');
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getUser(message.author.id) ?? message.author;
});
const env0_1 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore], function() {
return AccessibilityStore.roleStyle;
});
const value3 = (importDefault(4634) /* metro dependency 4634: useMessageAuthor */)(message);
const env0_2 = value3.nick;
const env0_3 = value3.colorString;
const env0_4 = value3.colorStrings;
const defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
const value4 = defaultImport.extractTimestamp(message.id);
const timestampString = (require(7169) /* metro dependency 7169: ThreadUtils */).getTimestampString(value4);
const timestampAccessibilityLabel = (require(7169) /* metro dependency 7169: ThreadUtils */).getTimestampAccessibilityLabel(value4);
const env0_5 = (importDefault(6630) /* metro dependency 6630: useHasEnhancedRoleColors */)(thread.guild_id,
value2.id);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const format = intl.format;
const M79KAH = (require(1244) /* metro dependency 1244: indexNative */).t.M79KAH;
return (
<SubstringRow
user={value2}
timestamp={timestampString}
accessibilityLabel={timestampAccessibilityLabel}
>
<Text
lineClamp={1}
ellipsizeMode="tail"
lineBreakMode="tail"
style={styles.subtextContent}
variant="text-sm/medium"
color="text-default"
function MessageContent({thread, message}) { // fn#114223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15294:1751, offset: 0x02418674, size: 511 bytes, params: 2, frame: 23
const styles = useStyles();
(SubscribeGuildMembersModule).useSubscribeGuildMembers({[thread.guild_id]: [message.author.id]},
'ThreadBrowserRowSubtext');
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getUser(message.author.id) ?? message.author;
});
const env0_1 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore], function() {
return AccessibilityStore.roleStyle;
});
const value3 = (UseMessageAuthor)(message);
const env0_2 = value3.nick;
const env0_3 = value3.colorString;
const env0_4 = value3.colorStrings;
const defaultImport = SnowflakeUtils;
const value4 = defaultImport.extractTimestamp(message.id);
const timestampString = (ThreadUtilsModule).getTimestampString(value4);
const timestampAccessibilityLabel = (ThreadUtilsModule).getTimestampAccessibilityLabel(value4);
const env0_5 = (UseHasEnhancedRoleColors)(thread.guild_id,
value2.id);
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
const format = intl.format;
const M79KAH = (IndexNativeModule).t.M79KAH;
return (
<SubstringRow
user={value2}
timestamp={timestampString}
accessibilityLabel={timestampAccessibilityLabel}
>
{Reflect.apply(format, intl, [M79KAH, {usernameHook: usernameHook_114226,
messageTextHook: messageTextHook}])}
</Text>
</SubstringRow>
);
}
<Text
lineClamp={1}
ellipsizeMode="tail"
lineBreakMode="tail"
style={styles.subtextContent}
variant="text-sm/medium"
color="text-default"
>
{Reflect.apply(format, intl, [M79KAH, {usernameHook: usernameHook_114226,
messageTextHook: messageTextHook}])}
</Text>
</SubstringRow>
);
function MessageContentUsernameHook(a0, a1) { // fn#114226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15294:2524, owner: MessageContent.usernameHook, offset: 0x024188a9, size: 134 bytes, params: 3, frame: 18
const value = environment.__proto__;
const nickBinding = nick;
const value2 = null;
return (
<Username_114229
nickname={value2 != nickBinding ? nick : ''}
usernameColor={roleStyle !== 'username' ? value2 : colorString}
roleColor={colorString}
roleColors={env0_5 ? colorStrings : value2}
shouldShowRoleDot={roleStyle === 'dot' && value2 != colorString}
key={a1}
/>
);
}
function SubstringRow({user, children, timestamp, accessibilityLabel}) { // fn#114228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15294:2798, offset: 0x02418994, size: 334 bytes, params: 2, frame: 23
const styles = useStyles();
return user == null ? <View style={styles.row}>{((Text) => <Text style={styles.timestamp} accessibilityLabel={accessibilityLabel} variant="text-sm/medium" color="text-muted">{' ' + timestamp}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View> : <View style={styles.row}>{children}<View style={styles.dividerDot} />{((Text) => <Text style={styles.timestamp} accessibilityLabel={accessibilityLabel} variant="text-sm/medium" color="text-muted">{'' + timestamp}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View>;
}
function messageTextHook(a0, a1) { // fn#114227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15294:2690, owner: MessageContent.messageTextHook, offset: 0x0241892f, size: 101 bytes, params: 3, frame: 17
const value = environment.__proto__;
const LegacyText = (NativeModule).LegacyText;
return (
<LegacyText key={a1}>
{(RenderMessageMarkup)(message, {'formatInline': true,
'allowGameMentions': true}).content}
</LegacyText>
);
}
function Username_114229({nickname, usernameColor, roleColor, roleColors, shouldShowRoleDot}) { // fn#114229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15294:3220, offset: 0x02418ae2, size: 330 bytes, params: 2, frame: 25
const styles = useStyles();
const value3 = env0_3.useMemo(function() {
return usernameColor != null ? [styles.username, {color: usernameColor}] : styles.username;
}, [usernameColor, styles]);
const value4 = (require(8206) /* metro dependency 8206: EnhancedRoleColorUtils */).useProcessColorStringsArray(roleColors);
const r12 = !shouldShowRoleDot && value4.length > 1;
const jsxRuntimeEnv0_11Binding = jsxRuntimeEnv0_11;
const r6 = shouldShowRoleDot && ((RoleDot) => <RoleDot color={roleColor} colors={roleColors} size="small" />)((require(1305) /* metro dependency 1305: native */).RoleDot);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const fabricUtilsModule = require(4020) /* metro dependency 4020: FabricUtils */;
return (
<>
{r6}
<Text
variant="text-sm/semibold"
color="mobile-text-heading-primary"
experimental_useNativeText={!fabricUtilsModule.isFabric()}
gradientColors={r12 ? value4 : undefined}
style={value3}
>
{nickname}
</Text>
</>
);
}
}
function _fun114231({thread, timestamp, accessibilityLabel}) { // fn#114231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15294:665, offset: 0x02418c6a, size: 549 bytes, params: 2, frame: 24
const styles = useStyles();
const user = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getUser(thread.ownerId);
});
const member = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], function() {
var threadBinding = thread;
return GuildMemberStore.getMember(threadBinding.guild_id, threadBinding.ownerId);
});
const env0_3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore], function() {
return AccessibilityStore.roleStyle;
});
const env0_4 = member?.colorString ?? null;
const env0_5 = member?.colorStrings ?? null;
const env0_6 = (importDefault(6630) /* metro dependency 6630: useHasEnhancedRoleColors */)(thread.guild_id,
user?.id);
const env0_7 = env0_3.useRef(thread);
env0_3.useEffect(_fun114235);
env0_3.useEffect(_fun114236, [member, user]);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<SubstringRow
user={user}
timestamp={timestamp}
accessibilityLabel={accessibilityLabel}
>
<Text
lineClamp={1}
ellipsizeMode="tail"
lineBreakMode="tail"
style={styles.subtextContent}
function SubstringRow({user, children, timestamp, accessibilityLabel}) { // fn#114228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15294:2798, offset: 0x02418994, size: 334 bytes, params: 2, frame: 23
const styles = useStyles();
return (
user == null
? (
<View style={styles.row}>
{((Text) => <Text style={styles.timestamp} accessibilityLabel={accessibilityLabel} variant="text-sm/medium" color="text-muted">{' ' + timestamp}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
</View>
)
: (
<View style={styles.row}>
{children}
<View style={styles.dividerDot} />
{((Text) => <Text style={styles.timestamp} accessibilityLabel={accessibilityLabel} variant="text-sm/medium" color="text-muted">{'' + timestamp}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
</View>
)
);
}
function Username_114229({nickname, usernameColor, roleColor, roleColors, shouldShowRoleDot}) { // fn#114229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15294:3220, offset: 0x02418ae2, size: 330 bytes, params: 2, frame: 25
const styles = useStyles();
const value3 = env0_3.useMemo(function() {
return usernameColor != null ? [styles.username, {color: usernameColor}] : styles.username;
}, [usernameColor, styles]);
const value4 = (EnhancedRoleColorUtilsModule).useProcessColorStringsArray(roleColors);
const r12 = !shouldShowRoleDot && value4.length > 1;
const jsxRuntimeEnv0_11Binding = jsxRuntimeEnv0_11;
const r6 = shouldShowRoleDot && ((RoleDot) => <RoleDot color={roleColor} colors={roleColors} size="small" />)((require(1305) /* metro dependency 1305: native */).RoleDot);
const Text = (TextModule).Text;
return (
<>
{r6}
<Text
variant="text-sm/semibold"
color="mobile-text-heading-primary"
experimental_useNativeText={!FabricUtilsModule.isFabric()}
gradientColors={r12 ? value4 : undefined}
style={value3}
>
{nickname}
</Text>
</>
);
}
function _fun114231({thread, timestamp, accessibilityLabel}) { // fn#114231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15294:665, offset: 0x02418c6a, size: 549 bytes, params: 2, frame: 24
const styles = useStyles();
const user = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getUser(thread.ownerId);
});
const member = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], function() {
var guildMemberStoreBinding = GuildMemberStore;
var threadBinding = thread;
return guildMemberStoreBinding.getMember(threadBinding.guild_id, threadBinding.ownerId);
});
const env0_3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore], function() {
return AccessibilityStore.roleStyle;
});
const env0_4 = member?.colorString ?? null;
const env0_5 = member?.colorStrings ?? null;
const env0_6 = (importDefault(6630) /* metro dependency 6630: useHasEnhancedRoleColors */)(thread.guild_id,
user?.id);
const env0_7 = env0_3.useRef(thread);
env0_3.useEffect(_fun114235);
env0_3.useEffect(_fun114236, [member, user]);
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
return (
<SubstringRow
user={user}
timestamp={timestamp}
accessibilityLabel={accessibilityLabel}
variant="text-sm/medium"
color="text-default"
>
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.imPXd5,
{usernameHook: usernameHook})}
</Text>
</SubstringRow>
);
}
<Text
lineClamp={1}
ellipsizeMode="tail"
lineBreakMode="tail"
style={styles.subtextContent}
accessibilityLabel={accessibilityLabel}
variant="text-sm/medium"
color="text-default"
>
{intl.format((IndexNativeModule).t.imPXd5,
{usernameHook: usernameHook_114237})}
</Text>
</SubstringRow>
);
function _fun114235() { // fn#114235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15294:1097, offset: 0x01df3c25, size: 21 bytes, params: 1, frame: 2
env0_7.current = thread;
}
function _fun114236() { // fn#114236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15294:1130, offset: 0x02418ed7, size: 90 bytes, params: 1, frame: 14
var current;
var value;
if (user == null) {
current = env0_7.current;
value = environment.__proto__;
value = importDefault(6593) /* metro dependency 6593: GuildActionCreators */;
value.requestMembersById(current.guild_id, [current.ownerId]);
} else if (member == null) {
current = env0_7.current;
value = environment.__proto__;
value = importDefault(6593) /* metro dependency 6593: GuildActionCreators */;
value.requestMembersById(current.guild_id, [current.ownerId]);
}
}
function usernameHook_114237(a0, a1) { // fn#114237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15294:1509, offset: 0x02418f31, size: 191 bytes, params: 3, frame: 20
var r7;
let value = environment.__proto__;
const memberBinding = member;
const value3 = null;
const nick = value3 == memberBinding ? undefined : member.nick;
if (value3 != nick) {
r7 = nick;
} else {
value = importDefault(3995) /* metro dependency 3995: UserUtils */;
value = value.getName(user);
r7 = value;
}
return (
<Username_114229
nickname={value3 != r7 ? r7 : ''}
usernameColor={roleStyle !== 'username' ? value3 : env0_4}
roleColor={env0_4}
roleColors={env0_6 ? env0_5 : value3}
shouldShowRoleDot={roleStyle === 'dot' && value3 != env0_4}
key={a1}
/>
);
}
function ThreadSubtext({thread}) { // fn#114238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15294:3816, offset: 0x02418ff0, size: 255 bytes, params: 2, frame: 21
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ThreadMessageStore], function() {
return ThreadMessageStore.getMostRecentMessage(id);
}, [thread.id]);
const value3 = (require(7169) /* metro dependency 7169: ThreadUtils */).useLastMessageTimestamp(thread);
if (value2 == null) {
return ((Component) => <Component thread={thread} timestamp={(require(7169) /* metro dependency 7169: ThreadUtils */).getTimestampString(value3)} accessibilityLabel={(require(7169) /* metro dependency 7169: ThreadUtils */).getTimestampAccessibilityLabel(value3)} />)(env0_14);
}
const binding = env0_12;
if (binding.includes(value2.type)) {
return ((Component) => <Component thread={thread} timestamp={(require(7169) /* metro dependency 7169: ThreadUtils */).getTimestampString(value3)} accessibilityLabel={(require(7169) /* metro dependency 7169: ThreadUtils */).getTimestampAccessibilityLabel(value3)} />)(env0_14);
function ThreadSubtext({thread}) { // fn#114238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15294:3816, offset: 0x02418ff0, size: 255 bytes, params: 2, frame: 21
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ThreadMessageStore], function() {
return ThreadMessageStore.getMostRecentMessage(id);
}, [thread.id]);
const value3 = (require(7169) /* metro dependency 7169: ThreadUtils */).useLastMessageTimestamp(thread);
if (value2 == null) {
return ((Component) => <Component thread={thread} timestamp={(require(7169) /* metro dependency 7169: ThreadUtils */).getTimestampString(value3)} accessibilityLabel={(require(7169) /* metro dependency 7169: ThreadUtils */).getTimestampAccessibilityLabel(value3)} />)(env0_14);
}
const binding = env0_12;
if (binding.includes(value2.type)) {
return ((Component) => <Component thread={thread} timestamp={(require(7169) /* metro dependency 7169: ThreadUtils */).getTimestampString(value3)} accessibilityLabel={(require(7169) /* metro dependency 7169: ThreadUtils */).getTimestampAccessibilityLabel(value3)} />)(env0_14);
}
if (thread.isArchivedThread()) {
return ((Component) => <Component thread={thread} timestamp={(require(7169) /* metro dependency 7169: ThreadUtils */).getTimestampString(value3)} accessibilityLabel={(require(7169) /* metro dependency 7169: ThreadUtils */).getTimestampAccessibilityLabel(value3)} />)(env0_14);
}
return <MessageContent thread={thread} message={value2} />;
}
if (thread.isArchivedThread()) {
return ((Component) => <Component thread={thread} timestamp={(require(7169) /* metro dependency 7169: ThreadUtils */).getTimestampString(value3)} accessibilityLabel={(require(7169) /* metro dependency 7169: ThreadUtils */).getTimestampAccessibilityLabel(value3)} />)(env0_14);
}
return <MessageContent thread={thread} message={value2} />;
}
function MessageContentUsernameHook(a0, a1) { // fn#114226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15294:2524, owner: MessageContent.usernameHook, offset: 0x024188a9, size: 134 bytes, params: 3, frame: 18
const value = environment.__proto__;
const nickBinding = nick;
const value2 = null;
return (
<Username_114229
nickname={value2 != nickBinding ? nick : ''}
usernameColor={roleStyle !== 'username' ? value2 : colorString}
roleColor={colorString}
roleColors={env0_5 ? colorStrings : value2}
shouldShowRoleDot={roleStyle === 'dot' && value2 != colorString}
key={a1}
/>
);
}
function messageTextHook(a0, a1) { // fn#114227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15294:2690, owner: MessageContent.messageTextHook, offset: 0x0241892f, size: 101 bytes, params: 3, frame: 17
const value = environment.__proto__;
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
return (
<LegacyText key={a1}>
{(importDefault(8349) /* metro dependency 8349: renderMessageMarkup */)(message, {'formatInline': true,
'allowGameMentions': true}).content}
</LegacyText>
);
}
function _fun114236() { // fn#114236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15294:1130, offset: 0x02418ed7, size: 90 bytes, params: 1, frame: 14
var current;
var value;
if (user == null) {
current = env0_7.current;
value = environment.__proto__;
value = importDefault(6593) /* metro dependency 6593: GuildActionCreators */;
value.requestMembersById(current.guild_id, [current.ownerId]);
} else if (member == null) {
current = env0_7.current;
value = environment.__proto__;
value = importDefault(6593) /* metro dependency 6593: GuildActionCreators */;
value.requestMembersById(current.guild_id, [current.ownerId]);
}
}
function usernameHook(a0, a1) { // fn#114237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15294:1509, offset: 0x02418f31, size: 191 bytes, params: 3, frame: 20
var r7;
let value = environment.__proto__;
const memberBinding = member;
const value3 = null;
const nick = value3 == memberBinding ? undefined : member.nick;
if (value3 != nick) {
r7 = nick;
} else {
value = importDefault(3995) /* metro dependency 3995: UserUtils */;
value = value.getName(user);
r7 = value;
}
return (
<Username_114229
nickname={value3 != r7 ? r7 : ''}
usernameColor={roleStyle !== 'username' ? value3 : env0_4}
roleColor={env0_4}
roleColors={env0_6 ? env0_5 : value3}
shouldShowRoleDot={roleStyle === 'dot' && value3 != env0_4}
key={a1}
/>
);
}
global.__d(_fun114222, 15097, [31, 27, 4502, 1945, 1878, 6898, 661, 482, 33, 4501, 697, 566, 7169, 6630, 6593, 4573,
1244, 3995, 6902, 4634, 21, 1305, 8349, 8206, 4020,
2]) /* metro module 15097, dependencies: [31, 27, 4502, 1945, 1878, 6898, 661, 482, 33, 4501, 697, 566, 7169, 6630, 6593, 4573, 1244, 3995, 6902, 4634, 21, 1305, 8349, 8206, 4020, 2] */;
@@ -1,14 +1,34 @@
/* Metro module 14535; source: modules/threads/native/components/ThreadLongPressActionSheet.tsx; dependencies: [31, 1379, 1867, 4297, 3786, 661, 33, 1244, 8999, 5097, 11234, 4054, 7153, 10859, 8850, 4076, 4066, 11237, 6705, 9646, 8148, 4056, 12148, 10629, 4080, 10936, 1962, 9216, 11241, 11243, 566, 6860, 22, 9626, 4805, 3829, 11247, 6819, 1305, 6805, 11251, 6807, 8772, 6797, 3856, 2] */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildStore from '../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import JoinedThreadsStore from '../../JoinedThreadsStore.tsx'; /* Metro dependency 3786 */
import VoiceStateStore from '../../../../stores/VoiceStateStore.tsx'; /* Metro dependency 4297 */
import UseChannelName from '../../../channel/useChannelName.tsx'; /* Metro dependency 4805 */
import ChannelSettingsActionCreators from '../../../../actions/ChannelSettingsActionCreators.tsx'; /* Metro dependency 8148 */
import UseHandleJoinThreadVoice from '../useHandleJoinThreadVoice.tsx'; /* Metro dependency 9626 */
import BuildFavoritesSectionButtonsNative from '../../../favorites/buildFavoritesSectionButtons.native.tsx'; /* Metro dependency 11234 */
import UseMobileChannelFavoriteActions from '../../../favorites/useMobileChannelFavoriteActions.tsx'; /* Metro dependency 11247 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UserSettingsModule from '../../../user_settings/UserSettings.tsx'; /* Metro dependency 3829 */
import * as ToastUtilsModule from '../../../toast/native/ToastUtils.tsx'; /* Metro dependency 3856 */
import * as LinkIconModule from '../../../../design/components/Icon/native/redesign/generated/LinkIcon.tsx'; /* Metro dependency 4056 */
import * as XLargeIconModule from '../../../../design/components/Icon/native/redesign/generated/XLargeIcon.tsx'; /* Metro dependency 4066 */
import * as ClipboardUtilsNativeModule from '../../../../utils/ClipboardUtils.native.tsx'; /* Metro dependency 6797 */
import * as ActionSheetNativeModule from '../../../../design/components/Sheet/native/ActionSheet.native.tsx'; /* Metro dependency 6805 */
import * as ActionSheetRowNativeModule from '../../../../design/components/Sheet/native/ActionSheetRow.native.tsx'; /* Metro dependency 6807 */
import * as ThreadHooksModule from '../../ThreadHooks.tsx'; /* Metro dependency 6860 */
import * as EyeIconModule from '../../../../design/components/Icon/native/redesign/generated/EyeIcon.tsx'; /* Metro dependency 8999 */
import * as ChannelNotificationIconModule from '../../../../design/components/Icon/native/redesign/generated/ChannelNotificationIcon.tsx'; /* Metro dependency 11241 */
import * as ActionSheetIconHeaderNativeModule from '../../../../design/components/Sheet/native/ActionSheetIconHeader.native.tsx'; /* Metro dependency 11251 */
function _fun109962(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:6, offset: 0x023635d2, size: 278 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
const joinedThreadsStore = importDefault(3786) /* metro dependency 3786: JoinedThreadsStore */;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const env0_8 = value.AnalyticsObjectTypes;
const env0_9 = value.AnalyticsObjects;
const env0_10 = value.AnalyticsSections;
@@ -16,366 +36,393 @@ function _fun109962(global, require, importDefault, importAll, module, exports,
value = require(33) /* metro dependency 33 */;
const env0_12 = value.jsx;
const env0_13 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/threads/native/components/ThreadLongPressActionSheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/threads/native/components/ThreadLongPressActionSheet.tsx');
exports.default = ThreadLongPressActionSheet;
}
function ThreadLongPressActionSheetConnected({channel, onClose}) { // fn#109963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:279, offset: 0x023636e8, size: 1012 bytes, params: 2, frame: 37
var object2;
var r5;
const ActionSheetRow = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
var Group;
var intl;
const env0_2 = channel.getGuildId();
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun109964);
const {isMuted,
hasJoined} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([JoinedThreadsStore],
function() {
var object = {};
var channelBinding = channel;
object.isMuted = JoinedThreadsStore.isMuted(channelBinding.id);
object.hasJoined = JoinedThreadsStore.hasJoined(channelBinding.id);
return object;
});
const value3 = (require(6860) /* metro dependency 6860: ThreadHooks */).useCanManageThread(channel);
const value4 = (require(6860) /* metro dependency 6860: ThreadHooks */).useIsThreadModerator(channel);
const value5 = (require(6860) /* metro dependency 6860: ThreadHooks */).useCanUnarchiveThread(channel);
const value6 = (require(6860) /* metro dependency 6860: ThreadHooks */).useCanJoinThreadVoice(channel);
const value7 = (require(566) /* metro dependency 566: flux */).useStateFromStores([VoiceStateStore], function() {
return VoiceStateStore.isInChannel(channel.id);
});
const value8 = (require(566) /* metro dependency 566: flux */).useStateFromStores([VoiceStateStore], function() {
return !importDefault(dependencyMap[32]).isEmpty(VoiceStateStore.getVoiceStatesForChannel(channel.id));
});
const value9 = (importDefault(9626) /* metro dependency 9626: useHandleJoinThreadVoice */)(channel);
const value10 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel, true);
const DeveloperMode = (require(3829) /* metro dependency 3829: UserSettings */).DeveloperMode;
const value11 = DeveloperMode.useSetting();
const env0_3 = value11;
const value12 = (importDefault(11247) /* metro dependency 11247: useMobileChannelFavoriteActions */)(channel,
'ThreadLongPressActionSheet');
const r10 = guild != null ? ((Component) => <Component guild={guild} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.LARGE} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */) : ((Avatar) => <Avatar size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.LARGE} channel={channel} />)((require(1305) /* metro dependency 1305: native */).Avatar);
object2 = {channel: channel, guild: guild, canManageThread: value3, canModerateThread: value4,
canUnarchiveThread: value5, isMuted: isMuted, hasJoined: hasJoined};
object2.isForumPost = channel.isForumPost();
object2.handleJoinThreadVoice = value6 ? value7 ? null : value9 : null;
object2.hasActiveThreadVoice = value8;
object2.favorites = value12;
const value16 = ThreadLongPressActionSheetConnectedGetActionSheetButtons(object2);
env0_3.useEffect(_fun109981, [value16.length, value11, onClose]);
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
object2 = {};
const ActionSheetIconHeader = (require(11251) /* metro dependency 11251: ActionSheetIconHeaderNative */).ActionSheetIconHeader;
object2.header = <ActionSheetIconHeader title={value10} icon={r10} />;
const value17 = value16.map(_fun109982);
if (value11) {
Group = ActionSheetRow.Group;
var actionSheetRowProps = {icon: ((Icon) => <Icon IconComponent={(require(8772) /* metro dependency 8772: IdIcon */).IdIcon} />)((require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon)};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
actionSheetRowProps.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.DQ797g);
actionSheetRowProps.onPress = onPress_109985;
r5 = <Group hasIcons key="developer-actions"><ActionSheetRow {...actionSheetRowProps} /></Group>;
} else {
r5 = value11;
}
return (
<ActionSheet {...object2}>
{value17}
{r5}
</ActionSheet>
);
}
function ThreadLongPressActionSheet({channelId, onClose}) { // fn#109986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:5222, offset: 0x02364738, size: 153 bytes, params: 2, frame: 18
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
env0_3.useEffect(function() {
if (channel == null) {
onClose();
}
}, [channel, onClose]);
return channel != null ? <ThreadLongPressActionSheetConnected channel={channel} onClose={onClose} /> : null;
}
function ThreadLongPressActionSheetConnectedGetActionSheetButtons({channel, canManageThread, canModerateThread, canUnarchiveThread, isMuted, hasJoined, isForumPost, handleJoinThreadVoice, hasActiveThreadVoice, favorites}) { // fn#109968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:1096, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons, offset: 0x02363b80, size: 1846 bytes, params: 2, frame: 31
var object;
var object3;
var object8;
const XLargeIcon = (require(4066) /* metro dependency 4066: XLargeIcon */).XLargeIcon;
var object16;
var isLockedThread2;
var object17;
var object18;
const items2 = [];
let push = items2.push;
const object19 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object19.label = Reflect.apply(string, intl, [t.e6RscS]);
const EyeIcon = (require(8999) /* metro dependency 8999: EyeIcon */).EyeIcon;
object19.IconComponent = EyeIcon;
object19.onPress = function() {
require(dependencyMap[9]).ack(channel.id, {section: AnalyticsSections.THREAD_ACTION_SHEET,
object: AnalyticsObjects.MARK_THREAD_AS_READ_BUTTON, objectType: AnalyticsObjectTypes.ACK_MANUAL}, true,
true);
};
Reflect.apply(push, items2, [{sectionKey: 'mark-as-read', buttons: [object19]}]);
const value2 = (importDefault(11234) /* metro dependency 11234: buildFavoritesSectionButtonsNative */)(favorites);
if (value2 != null) {
items2.push({sectionKey: 'favorites', buttons: [value2]});
}
const object20 = {sectionKey: 'channel-actions', buttons: []};
let buttons = object20.buttons;
push = buttons.push;
if (hasJoined) {
object3 = {};
string = intl.string;
object3.label = isForumPost ? Reflect.apply(string, intl, [t['2LsZdT']]) : Reflect.apply(string, intl,
[t['fa/84m']]);
object3.IconComponent = (require(4054) /* metro dependency 4054: UserMinusIcon */).UserMinusIcon;
object3.isDestructive = true;
object3.onPress = onPress_109970;
Reflect.apply(push, buttons, [object3]);
} else {
function ThreadLongPressActionSheetConnected({channel, onClose}) { // fn#109963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:279, offset: 0x023636e8, size: 1012 bytes, params: 2, frame: 37
var r5;
const ActionSheetRow = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
var Group;
var intl;
const env0_2 = channel.getGuildId();
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun109964);
const {isMuted,
hasJoined} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([JoinedThreadsStore],
function() {
var object = {};
var joinedThreadsStoreBinding = JoinedThreadsStore;
var channelBinding = channel;
object.isMuted = joinedThreadsStoreBinding.isMuted(channelBinding.id);
object.hasJoined = JoinedThreadsStore.hasJoined(channelBinding.id);
return object;
});
const value3 = (ThreadHooksModule).useCanManageThread(channel);
const value4 = (ThreadHooksModule).useIsThreadModerator(channel);
const value5 = (ThreadHooksModule).useCanUnarchiveThread(channel);
const value6 = (ThreadHooksModule).useCanJoinThreadVoice(channel);
const value7 = (require(566) /* metro dependency 566: flux */).useStateFromStores([VoiceStateStore], function() {
return VoiceStateStore.isInChannel(channel.id);
});
const value8 = (require(566) /* metro dependency 566: flux */).useStateFromStores([VoiceStateStore], function() {
return !importDefault(dependencyMap[32]).isEmpty(VoiceStateStore.getVoiceStatesForChannel(channel.id));
});
const value9 = (UseHandleJoinThreadVoice)(channel);
const value10 = (UseChannelName)(channel, true);
const DeveloperMode = (UserSettingsModule).DeveloperMode;
const value11 = DeveloperMode.useSetting();
const env0_3 = value11;
const value12 = (UseMobileChannelFavoriteActions)(channel,
'ThreadLongPressActionSheet');
const r10 = (
guild != null
? ((Component) => <Component guild={guild} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.LARGE} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */)
: ((Avatar) => <Avatar size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.LARGE} channel={channel} />)((require(1305) /* metro dependency 1305: native */).Avatar)
);
object = {channel: channel, guild: guild, canManageThread: value3, canModerateThread: value4,
canUnarchiveThread: value5, isMuted: isMuted, hasJoined: hasJoined};
object.isForumPost = channel.isForumPost();
object.handleJoinThreadVoice = value6 ? value7 ? null : value9 : null;
object.hasActiveThreadVoice = value8;
object.favorites = value12;
const value16 = ThreadLongPressActionSheetConnectedGetActionSheetButtons(object);
env0_3.useEffect(_fun109981, [value16.length, value11, onClose]);
const ActionSheet = (ActionSheetNativeModule).ActionSheet;
object = {};
string = intl.string;
object.label = isForumPost ? Reflect.apply(string, intl, [t.ihLPiO]) : Reflect.apply(string, intl,
[t['10kukS']]);
object.IconComponent = (require(10859) /* metro dependency 10859: GroupPlusIcon */).GroupPlusIcon;
object.onPress = onPress_109971;
Reflect.apply(push, buttons, [object]);
}
if (handleJoinThreadVoice != null) {
buttons = object20.buttons;
push = buttons.push;
object8 = {};
string = intl.string;
object8.label = hasActiveThreadVoice ? Reflect.apply(string, intl, [t['0D/6Rz']]) : Reflect.apply(string, intl,
[t.My50nf]);
object8.IconComponent = (require(8850) /* metro dependency 8850: PhoneCallIcon */).PhoneCallIcon;
object8.onPress = handleJoinThreadVoice;
Reflect.apply(push, buttons, [object8]);
}
const threadMetadata = channel.threadMetadata;
if (threadMetadata == null) {
if (canManageThread) {
buttons = object20.buttons;
push = buttons.push;
string = intl.string;
Reflect.apply(push, buttons, [{label: isForumPost ? Reflect.apply(string, intl,
[t.BTs4Kb]) : Reflect.apply(string,
intl, [t.wiIevd]), IconComponent: XLargeIcon, onPress: onPress_109973}]);
}
} else if (threadMetadata.archived) {
if (canUnarchiveThread) {
buttons = object20.buttons;
push = buttons.push;
object16 = {};
string = intl.string;
object16.label = isForumPost ? Reflect.apply(string, intl, [t.cnRubV]) : Reflect.apply(string, intl,
[t.S9E4G7]);
object16.IconComponent = (require(4076) /* metro dependency 4076: ClockIcon */).ClockIcon;
object16.onPress = onPress_109972;
Reflect.apply(push, buttons, [object16]);
}
} else if (canManageThread) {
buttons = object20.buttons;
push = buttons.push;
string = intl.string;
Reflect.apply(push, buttons, [{label: isForumPost ? Reflect.apply(string, intl,
[t.BTs4Kb]) : Reflect.apply(string,
intl, [t.wiIevd]), IconComponent: XLargeIcon, onPress: onPress_109973}]);
}
if (canModerateThread) {
isLockedThread2 = channel.isLockedThread();
buttons = object20.buttons;
push = buttons.push;
object17 = {};
string = intl.string;
if (isLockedThread2) {
object17.label = isForumPost ? Reflect.apply(string, intl, [t['/OKSxp']]) : Reflect.apply(string, intl,
[t['jeyb/W']]);
object17.IconComponent = (require(11237) /* metro dependency 11237: LockUnlockedIcon */).LockUnlockedIcon;
object17.onPress = onPress_109974;
Reflect.apply(push, buttons, [object17]);
const ActionSheetIconHeader = (ActionSheetIconHeaderNativeModule).ActionSheetIconHeader;
object.header = <ActionSheetIconHeader title={value10} icon={r10} />;
const value17 = value16.map(_fun109982);
if (value11) {
Group = ActionSheetRow.Group;
var actionSheetRowProps = {icon: ((Icon) => <Icon IconComponent={(require(8772) /* metro dependency 8772: IdIcon */).IdIcon} />)((require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon)};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
actionSheetRowProps.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.DQ797g);
actionSheetRowProps.onPress = onPress_109985;
r5 = (
<Group hasIcons key="developer-actions">
<ActionSheetRow {...actionSheetRowProps} />
</Group>
);
} else {
object17.label = isForumPost ? Reflect.apply(string, intl, [t['Ur/0Na']]) : Reflect.apply(string, intl,
[t.HoCqm8]);
object17.IconComponent = (require(6705) /* metro dependency 6705: LockIcon */).LockIcon;
object17.onPress = onPress_109975;
Reflect.apply(push, buttons, [object17]);
r5 = value11;
}
return (
<ActionSheet {...object}>
{value17}
{r5}
</ActionSheet>
);
function _fun109964() { // fn#109964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:405, offset: 0x01b9812e, size: 27 bytes, params: 1, frame: 11
return GuildStore.getGuild(env0_2);
}
function ThreadLongPressActionSheetConnectedGetActionSheetButtons({channel, canManageThread, canModerateThread, canUnarchiveThread, isMuted, hasJoined, isForumPost, handleJoinThreadVoice, hasActiveThreadVoice, favorites}) { // fn#109968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:1096, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons, offset: 0x02363b80, size: 1846 bytes, params: 2, frame: 31
var object2;
var object4;
var object5;
const XLargeIcon = (XLargeIconModule).XLargeIcon;
var object6;
var isLockedThread2;
var object7;
var object9;
const items2 = [];
let push = items2.push;
const object10 = {};
const intl = (IndexNativeModule).intl;
let string = intl.string;
const t = (IndexNativeModule).t;
object10.label = Reflect.apply(string, intl, [t.e6RscS]);
const EyeIcon = (EyeIconModule).EyeIcon;
object10.IconComponent = EyeIcon;
object10.onPress = function() {
require(dependencyMap[9]).ack(channel.id, {section: AnalyticsSections.THREAD_ACTION_SHEET,
object: AnalyticsObjects.MARK_THREAD_AS_READ_BUTTON, objectType: AnalyticsObjectTypes.ACK_MANUAL}, true,
true);
};
Reflect.apply(push, items2, [{sectionKey: 'mark-as-read', buttons: [object10]}]);
const value2 = (BuildFavoritesSectionButtonsNative)(favorites);
if (value2 != null) {
items2.push({sectionKey: 'favorites', buttons: [value2]});
}
const object11 = {sectionKey: 'channel-actions', buttons: []};
let buttons = object11.buttons;
push = buttons.push;
if (hasJoined) {
object4 = {};
string = intl.string;
object4.label = isForumPost ? Reflect.apply(string, intl, [t['2LsZdT']]) : Reflect.apply(string, intl,
[t['fa/84m']]);
object4.IconComponent = (require(4054) /* metro dependency 4054: UserMinusIcon */).UserMinusIcon;
object4.isDestructive = true;
object4.onPress = onPress_109970;
Reflect.apply(push, buttons, [object4]);
} else {
object2 = {};
string = intl.string;
object2.label = isForumPost ? Reflect.apply(string, intl, [t.ihLPiO]) : Reflect.apply(string, intl,
[t['10kukS']]);
object2.IconComponent = (require(10859) /* metro dependency 10859: GroupPlusIcon */).GroupPlusIcon;
object2.onPress = onPress_109971;
Reflect.apply(push, buttons, [object2]);
}
if (handleJoinThreadVoice != null) {
buttons = object11.buttons;
push = buttons.push;
object5 = {};
string = intl.string;
object5.label = hasActiveThreadVoice ? Reflect.apply(string, intl, [t['0D/6Rz']]) : Reflect.apply(string, intl,
[t.My50nf]);
object5.IconComponent = (require(8850) /* metro dependency 8850: PhoneCallIcon */).PhoneCallIcon;
object5.onPress = handleJoinThreadVoice;
Reflect.apply(push, buttons, [object5]);
}
const threadMetadata = channel.threadMetadata;
if (threadMetadata == null) {
if (canManageThread) {
buttons = object11.buttons;
push = buttons.push;
string = intl.string;
Reflect.apply(push, buttons, [{label: isForumPost ? Reflect.apply(string, intl,
[t.BTs4Kb]) : Reflect.apply(string,
intl, [t.wiIevd]), IconComponent: XLargeIcon, onPress: onPress_109973}]);
}
} else if (threadMetadata.archived) {
if (canUnarchiveThread) {
buttons = object11.buttons;
push = buttons.push;
object6 = {};
string = intl.string;
object6.label = isForumPost ? Reflect.apply(string, intl, [t.cnRubV]) : Reflect.apply(string, intl,
[t.S9E4G7]);
object6.IconComponent = (require(4076) /* metro dependency 4076: ClockIcon */).ClockIcon;
object6.onPress = onPress_109972;
Reflect.apply(push, buttons, [object6]);
}
} else if (canManageThread) {
buttons = object11.buttons;
push = buttons.push;
string = intl.string;
Reflect.apply(push, buttons, [{label: isForumPost ? Reflect.apply(string, intl,
[t.BTs4Kb]) : Reflect.apply(string,
intl, [t.wiIevd]), IconComponent: XLargeIcon, onPress: onPress_109973}]);
}
if (canModerateThread) {
isLockedThread2 = channel.isLockedThread();
buttons = object11.buttons;
push = buttons.push;
object7 = {};
string = intl.string;
if (isLockedThread2) {
object7.label = isForumPost ? Reflect.apply(string, intl, [t['/OKSxp']]) : Reflect.apply(string, intl,
[t['jeyb/W']]);
object7.IconComponent = (require(11237) /* metro dependency 11237: LockUnlockedIcon */).LockUnlockedIcon;
object7.onPress = onPress_109974;
Reflect.apply(push, buttons, [object7]);
} else {
object7.label = isForumPost ? Reflect.apply(string, intl, [t['Ur/0Na']]) : Reflect.apply(string, intl,
[t.HoCqm8]);
object7.IconComponent = (require(6705) /* metro dependency 6705: LockIcon */).LockIcon;
object7.onPress = onPress_109975;
Reflect.apply(push, buttons, [object7]);
}
}
if (canModerateThread) {
buttons = object11.buttons;
push = buttons.push;
object9 = {};
string = intl.string;
object9.label = isForumPost ? Reflect.apply(string, intl, [t.NP1yHG]) : Reflect.apply(string, intl,
[t['2Mk1TP']]);
object9.IconComponent = (require(9646) /* metro dependency 9646: PencilIcon */).PencilIcon;
object9.onPress = onPress_109976;
Reflect.apply(push, buttons, [object9]);
}
buttons = object11.buttons;
push = buttons.push;
const object12 = {};
string = intl.string;
const WqhZss = t.WqhZss;
object12.label = Reflect.apply(string, intl, [WqhZss]);
const LinkIcon = (LinkIconModule).LinkIcon;
object12.IconComponent = LinkIcon;
object12.isDestructive = false;
object12.onPress = onPress_109977;
Reflect.apply(push, buttons, [object12]);
items2.push(object11);
const object13 = {sectionKey: 'notifications', buttons: []};
buttons = object13.buttons;
push = buttons.push;
const object14 = {};
string = intl.string;
if (isMuted) {
object14.label = isForumPost ? Reflect.apply(string, intl, [t['0JQfsP']]) : Reflect.apply(string, intl,
[t['Cq/TzF']]);
object14.IconComponent = (require(9216) /* metro dependency 9216: BellIcon */).BellIcon;
object14.onPress = onPress_109978;
Reflect.apply(push, buttons, [object14]);
} else {
object14.label = isForumPost ? Reflect.apply(string, intl, [t['nP+Ykd']]) : Reflect.apply(string, intl,
[t.bUUd8q]);
object14.IconComponent = (require(10629) /* metro dependency 10629: BellSlashIcon */).BellSlashIcon;
object14.onPress = onPress_109979;
Reflect.apply(push, buttons, [object14]);
}
buttons = object13.buttons;
push = buttons.push;
const object15 = {};
object15.label = intl.string(t.h850Ss);
const ChannelNotificationIcon = (ChannelNotificationIconModule).ChannelNotificationIcon;
object15.IconComponent = ChannelNotificationIcon;
object15.onPress = onPress_109980;
object15.disableColor = true;
Reflect.apply(push, buttons, [object15]);
items2.push(object13);
return items2;
function getActionSheetButtonsOnPress_109970() { // fn#109970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:1836, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x02364320, size: 52 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
value = importDefault(7153) /* metro dependency 7153: ThreadActionCreators */;
value.leaveThread(channel, 'Context Menu');
}
function getActionSheetButtonsOnPress_109971() { // fn#109971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:2028, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x02364354, size: 52 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
value = importDefault(7153) /* metro dependency 7153: ThreadActionCreators */;
value.joinThread(channel, 'Context Menu');
}
function getActionSheetButtonsOnPress_109972() { // fn#109972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:2415, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x02364388, size: 48 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
value = importDefault(7153) /* metro dependency 7153: ThreadActionCreators */;
value.unarchiveThread(channel, false);
}
function getActionSheetButtonsOnPress_109973() { // fn#109973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:2596, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x023643b8, size: 48 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
value = importDefault(7153) /* metro dependency 7153: ThreadActionCreators */;
value.archiveThread(channel, false);
}
function getActionSheetButtonsOnPress_109974() { // fn#109974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:2807, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x023643e8, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = importDefault(7153) /* metro dependency 7153: ThreadActionCreators */;
value.unlockThread(channel);
}
function getActionSheetButtonsOnPress_109975() { // fn#109975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:2980, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x02364415, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = importDefault(7153) /* metro dependency 7153: ThreadActionCreators */;
value.lockThread(channel);
}
function getActionSheetButtonsOnPress_109976() { // fn#109976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:3157, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x02364442, size: 80 bytes, params: 1, frame: 15
let value = environment.__proto__.__proto__;
const defaultImport = ChannelSettingsActionCreators;
const setSection = defaultImport.setSection;
const OVERVIEW = ChannelSettingsSections.OVERVIEW;
Reflect.apply(setSection, defaultImport, [OVERVIEW]);
value = defaultImport;
value.open(channel.id);
}
function getActionSheetButtonsOnPress_109977() { // fn#109977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:3331, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x02364492, size: 56 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
value = require(12148) /* metro dependency 12148: ChannelActionSheetUtils */;
const copyGuildChannelOrThreadLink = value.copyGuildChannelOrThreadLink;
const channelBinding = channel;
Reflect.apply(copyGuildChannelOrThreadLink, value, [channelBinding.guild_id, channelBinding.id]);
}
function getActionSheetButtonsOnPress_109978() { // fn#109978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:3602, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x023644ca, size: 60 bytes, params: 1, frame: 15
let value = environment.__proto__.__proto__;
value = importDefault(7153) /* metro dependency 7153: ThreadActionCreators */;
value.setNotificationSettings(channel, {muted: !isMuted});
}
function getActionSheetButtonsOnPress_109979() { // fn#109979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:3802, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x02364506, size: 135 bytes, params: 1, frame: 18
let value = environment.__proto__.__proto__;
const defaultImport = importDefault(dependencyMap[24]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[26]);
value = value(dependencyMap[25], dependencyMap.paths);
const channelBinding = channel;
const value3 = 'muteSettings' + channelBinding.id;
const object = {};
object.guildId = channelBinding.getGuildId();
object.channelId = channelBinding.id;
Reflect.apply(openLazy, defaultImport, [value, value3, object]);
}
function getActionSheetButtonsOnPress_109980() { // fn#109980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:4027, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x0236458d, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = require(11243) /* metro dependency 11243: threadActionSheets */;
value.showThreadNotificationsBottomSheet(channel);
}
}
function _fun109981() { // fn#109981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:4336, offset: 0x020a8089, size: 42 bytes, params: 1, frame: 10
if (!(env0_4.length !== 0 || env0_3)) {
onClose();
}
}
function _fun109982(a0) { // fn#109982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:4479, offset: 0x023645ba, size: 97 bytes, params: 2, frame: 18
const ActionSheetRow = (ActionSheetRowNativeModule).ActionSheetRow;
const Group = ActionSheetRow.Group;
return (
<Group hasIcons key={a0.sectionKey}>
{a0.buttons.map(_fun109983)}
</Group>
);
function _fun109983({label, IconComponent, trailing, isDestructive, disableColor, onPress}, a1) { // fn#109983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:4551, offset: 0x0236461b, size: 179 bytes, params: 3, frame: 22
const ActionSheetRow = (ActionSheetRowNativeModule).ActionSheetRow;
const r7 = isDestructive ? 'danger' : 'default';
const ActionSheetRow2 = (ActionSheetRowNativeModule).ActionSheetRow;
const Icon = ActionSheetRow2.Icon;
return (
<ActionSheetRow
label={label}
variant={r7}
icon={<Icon IconComponent={IconComponent} disableColor={disableColor} />}
trailing={trailing}
onPress={function() {
onClose();
onPress();
}}
key={a1}
/>
);
}
}
function ThreadLongPressActionSheetConnectedOnPress() { // fn#109985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:5029, owner: ThreadLongPressActionSheetConnected.onPress, offset: 0x023646e8, size: 80 bytes, params: 1, frame: 14
onClose();
ClipboardUtilsNativeModule.copy(channel.id);
(ToastUtilsModule).presentIdCopied();
}
}
if (canModerateThread) {
buttons = object20.buttons;
push = buttons.push;
object18 = {};
string = intl.string;
object18.label = isForumPost ? Reflect.apply(string, intl, [t.NP1yHG]) : Reflect.apply(string, intl,
[t['2Mk1TP']]);
object18.IconComponent = (require(9646) /* metro dependency 9646: PencilIcon */).PencilIcon;
object18.onPress = onPress_109976;
Reflect.apply(push, buttons, [object18]);
function ThreadLongPressActionSheet({channelId, onClose}) { // fn#109986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:5222, offset: 0x02364738, size: 153 bytes, params: 2, frame: 18
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
ReactModule.useEffect(function() {
if (channel == null) {
onClose();
}
}, [channel, onClose]);
return (
channel != null
? (
<ThreadLongPressActionSheetConnected channel={channel} onClose={onClose} />
)
: null
);
}
buttons = object20.buttons;
push = buttons.push;
const object21 = {};
string = intl.string;
const WqhZss = t.WqhZss;
object21.label = Reflect.apply(string, intl, [WqhZss]);
const LinkIcon = (require(4056) /* metro dependency 4056: LinkIcon */).LinkIcon;
object21.IconComponent = LinkIcon;
object21.isDestructive = false;
object21.onPress = onPress_109977;
Reflect.apply(push, buttons, [object21]);
items2.push(object20);
const object22 = {sectionKey: 'notifications', buttons: []};
buttons = object22.buttons;
push = buttons.push;
const object23 = {};
string = intl.string;
if (isMuted) {
object23.label = isForumPost ? Reflect.apply(string, intl, [t['0JQfsP']]) : Reflect.apply(string, intl,
[t['Cq/TzF']]);
object23.IconComponent = (require(9216) /* metro dependency 9216: BellIcon */).BellIcon;
object23.onPress = onPress_109978;
Reflect.apply(push, buttons, [object23]);
} else {
object23.label = isForumPost ? Reflect.apply(string, intl, [t['nP+Ykd']]) : Reflect.apply(string, intl,
[t.bUUd8q]);
object23.IconComponent = (require(10629) /* metro dependency 10629: BellSlashIcon */).BellSlashIcon;
object23.onPress = onPress_109979;
Reflect.apply(push, buttons, [object23]);
}
buttons = object22.buttons;
push = buttons.push;
const object24 = {};
object24.label = intl.string(t.h850Ss);
const ChannelNotificationIcon = (require(11241) /* metro dependency 11241: ChannelNotificationIcon */).ChannelNotificationIcon;
object24.IconComponent = ChannelNotificationIcon;
object24.onPress = onPress_109980;
object24.disableColor = true;
Reflect.apply(push, buttons, [object24]);
items2.push(object22);
return items2;
}
function _fun109982(a0) { // fn#109982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:4479, offset: 0x023645ba, size: 97 bytes, params: 2, frame: 18
const ActionSheetRow = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
const Group = ActionSheetRow.Group;
return (
<Group hasIcons key={a0.sectionKey}>
{a0.buttons.map(_fun109983)}
</Group>
);
}
function ThreadLongPressActionSheetConnectedOnPress() { // fn#109985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:5029, owner: ThreadLongPressActionSheetConnected.onPress, offset: 0x023646e8, size: 80 bytes, params: 1, frame: 14
onClose();
const clipboardUtilsNativeModule = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
clipboardUtilsNativeModule.copy(channel.id);
(require(3856) /* metro dependency 3856: ToastUtils */).presentIdCopied();
}
function getActionSheetButtonsOnPress_109970() { // fn#109970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:1836, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x02364320, size: 52 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
value = importDefault(7153) /* metro dependency 7153: ThreadActionCreators */;
value.leaveThread(channel, 'Context Menu');
}
function getActionSheetButtonsOnPress_109971() { // fn#109971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:2028, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x02364354, size: 52 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
value = importDefault(7153) /* metro dependency 7153: ThreadActionCreators */;
value.joinThread(channel, 'Context Menu');
}
function getActionSheetButtonsOnPress_109972() { // fn#109972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:2415, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x02364388, size: 48 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
value = importDefault(7153) /* metro dependency 7153: ThreadActionCreators */;
value.unarchiveThread(channel, false);
}
function getActionSheetButtonsOnPress_109973() { // fn#109973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:2596, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x023643b8, size: 48 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
value = importDefault(7153) /* metro dependency 7153: ThreadActionCreators */;
value.archiveThread(channel, false);
}
function getActionSheetButtonsOnPress_109974() { // fn#109974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:2807, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x023643e8, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = importDefault(7153) /* metro dependency 7153: ThreadActionCreators */;
value.unlockThread(channel);
}
function getActionSheetButtonsOnPress_109975() { // fn#109975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:2980, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x02364415, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = importDefault(7153) /* metro dependency 7153: ThreadActionCreators */;
value.lockThread(channel);
}
function getActionSheetButtonsOnPress_109976() { // fn#109976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:3157, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x02364442, size: 80 bytes, params: 1, frame: 15
let value = environment.__proto__.__proto__;
const defaultImport = importDefault(8148) /* metro dependency 8148: ChannelSettingsActionCreators */;
const setSection = defaultImport.setSection;
const OVERVIEW = ChannelSettingsSections.OVERVIEW;
Reflect.apply(setSection, defaultImport, [OVERVIEW]);
value = defaultImport;
value.open(channel.id);
}
function getActionSheetButtonsOnPress_109977() { // fn#109977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:3331, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x02364492, size: 56 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
value = require(12148) /* metro dependency 12148: ChannelActionSheetUtils */;
const copyGuildChannelOrThreadLink = value.copyGuildChannelOrThreadLink;
const channelBinding = channel;
Reflect.apply(copyGuildChannelOrThreadLink, value, [channelBinding.guild_id, channelBinding.id]);
}
function getActionSheetButtonsOnPress_109978() { // fn#109978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:3602, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x023644ca, size: 60 bytes, params: 1, frame: 15
let value = environment.__proto__.__proto__;
value = importDefault(7153) /* metro dependency 7153: ThreadActionCreators */;
value.setNotificationSettings(channel, {muted: !isMuted});
}
function getActionSheetButtonsOnPress_109979() { // fn#109979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:3802, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x02364506, size: 135 bytes, params: 1, frame: 18
let value = environment.__proto__.__proto__;
const defaultImport = importDefault(dependencyMap[24]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[26]);
value = value(dependencyMap[25], dependencyMap.paths);
const channelBinding = channel;
const value3 = 'muteSettings' + channelBinding.id;
const object2 = {};
object2.guildId = channelBinding.getGuildId();
object2.channelId = channelBinding.id;
Reflect.apply(openLazy, defaultImport, [value, value3, object2]);
}
function getActionSheetButtonsOnPress_109980() { // fn#109980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:4027, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x0236458d, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = require(11243) /* metro dependency 11243: threadActionSheets */;
value.showThreadNotificationsBottomSheet(channel);
}
function _fun109983({label, IconComponent, trailing, isDestructive, disableColor, onPress}, a1) { // fn#109983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:4551, offset: 0x0236461b, size: 179 bytes, params: 3, frame: 22
const ActionSheetRow = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
const r7 = isDestructive ? 'danger' : 'default';
const ActionSheetRow2 = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
const Icon = ActionSheetRow2.Icon;
return (
<ActionSheetRow
label={label}
variant={r7}
icon={<Icon IconComponent={IconComponent} disableColor={disableColor} />}
trailing={trailing}
onPress={function() {
onClose();
onPress();
}}
key={a1}
/>
);
}
global.__d(_fun109962, 14535, [31, 1379, 1867, 4297, 3786, 661, 33, 1244, 8999, 5097, 11234, 4054, 7153, 10859,
8850, 4076, 4066, 11237, 6705, 9646, 8148, 4056, 12148, 10629, 4080, 10936, 1962, 9216, 11241, 11243, 566, 6860,
22, 9626, 4805, 3829, 11247, 6819, 1305, 6805, 11251, 6807, 8772, 6797, 3856,
2]) /* metro module 14535, dependencies: [31, 1379, 1867, 4297, 3786, 661, 33, 1244, 8999, 5097, 11234, 4054, 7153, 10859, 8850, 4076, 4066, 11237, 6705, 9646, 8148, 4056, 12148, 10629, 4080, 10936, 1962, 9216, 11241, 11243, 566, 6860, 22, 9626, 4805, 3829, 11247, 6819, 1305, 6805, 11251, 6807, 8772, 6797, 3856, 2] */;
@@ -1,50 +1,61 @@
/* Metro module 11244; source: modules/threads/native/components/ThreadNotificationSettingsBottomSheet.tsx; dependencies: [1243, 33, 10914, 6805, 6758, 1244, 7988, 7153, 7987, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ThreadConstantsModule from '../../ThreadConstants.tsx'; /* Metro dependency 1243 */
import * as BottomSheetTitleHeaderNativeModule from '../../../../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */
import * as ActionSheetNativeModule from '../../../../design/components/Sheet/native/ActionSheet.native.tsx'; /* Metro dependency 6805 */
import * as TableRadioRowNativeModule from '../../../../design/components/TableRow/native/TableRadioRow.native.tsx'; /* Metro dependency 7987 */
import * as TableRadioGroupNativeModule from '../../../../design/components/TableRow/native/TableRadioGroup.native.tsx'; /* Metro dependency 7988 */
import * as ThreadNotificationSettingsModule from '../../ThreadNotificationSettings.tsx'; /* Metro dependency 10914 */
function _fun85961(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11430:6, offset: 0x01f82b9a, size: 145 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(1243) /* metro dependency 1243: ThreadConstants */).getThreadNotificationOptions;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/threads/native/components/ThreadNotificationSettingsBottomSheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/threads/native/components/ThreadNotificationSettingsBottomSheet.tsx');
exports.default = ThreadNotificationsBottomSheet;
function ThreadNotificationsBottomSheet({channel}) { // fn#85962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11430:268, offset: 0x01f82c2b, size: 293 bytes, params: 2, frame: 24
const value2 = (ThreadNotificationSettingsModule).useThreadNotificationSetting(channel);
const ActionSheet = (ActionSheetNativeModule).ActionSheet;
const object = {};
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.header = (
<BottomSheetTitleHeader title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.h850Ss)} />
);
const TableRadioGroup = (TableRadioGroupNativeModule).TableRadioGroup;
return (
<ActionSheet {...object}>
<TableRadioGroup
hasIcons={false}
value={value2}
onChange={onChange_85963}
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.h850Ss)}
>
{getThreadNotificationOptions().map(_fun85964)}
</TableRadioGroup>
</ActionSheet>
);
function ThreadNotificationsBottomSheetOnChange(a0) { // fn#85963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11430:549, owner: ThreadNotificationsBottomSheet.onChange, offset: 0x01f82d50, size: 55 bytes, params: 2, frame: 14
let value = environment.__proto__;
value = importDefault(7153) /* metro dependency 7153: ThreadActionCreators */;
return value.setNotificationSettings(channel, {flags: a0});
}
function _fun85964({setting, label}) { // fn#85964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11430:672, offset: 0x01f82d87, size: 90 bytes, params: 2, frame: 17
const TableRadioRow = (TableRadioRowNativeModule).TableRadioRow;
return (
<TableRadioRow
value={setting}
label={label}
key={'' + setting}
/>
);
}
}
}
function ThreadNotificationsBottomSheet({channel}) { // fn#85962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11430:268, offset: 0x01f82c2b, size: 293 bytes, params: 2, frame: 24
const value2 = (require(10914) /* metro dependency 10914: ThreadNotificationSettings */).useThreadNotificationSetting(channel);
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
const object2 = {};
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.header = <BottomSheetTitleHeader title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.h850Ss)} />;
const TableRadioGroup = (require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup;
return (
<ActionSheet {...object2}>
<TableRadioGroup
hasIcons={false}
value={value2}
onChange={onChange_85963}
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.h850Ss)}
>
{getThreadNotificationOptions().map(_fun85964)}
</TableRadioGroup>
</ActionSheet>
);
}
function ThreadNotificationsBottomSheetOnChange(a0) { // fn#85963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11430:549, owner: ThreadNotificationsBottomSheet.onChange, offset: 0x01f82d50, size: 55 bytes, params: 2, frame: 14
let value = environment.__proto__;
value = importDefault(7153) /* metro dependency 7153: ThreadActionCreators */;
return value.setNotificationSettings(channel, {flags: a0});
}
function _fun85964({setting, label}) { // fn#85964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11430:672, offset: 0x01f82d87, size: 90 bytes, params: 2, frame: 17
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
return (
<TableRadioRow
value={setting}
label={label}
key={'' + setting}
/>
);
}
global.__d(_fun85961, 11244, [1243, 33, 10914, 6805, 6758, 1244, 7988, 7153, 7987,
2]) /* metro module 11244, dependencies: [1243, 33, 10914, 6805, 6758, 1244, 7988, 7153, 7987, 2] */;
@@ -1,58 +1,72 @@
/* Metro module 15014; source: modules/threads/native/components/ThreadParentMessage.tsx; dependencies: [31, 4833, 4814, 33, 8177, 566, 5278, 1230, 9773, 2] */
import MessageStore from '../../../../stores/MessageStore.tsx'; /* Metro dependency 4814 */
import ReferencedMessageStore from '../../../replies/ReferencedMessageStore.tsx'; /* Metro dependency 4833 */
import RowGenerator from '../../../messages/native/renderer/RowGenerator.tsx'; /* Metro dependency 8177 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
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 ReferencedMessageStoreModule from '../../../replies/ReferencedMessageStore.tsx'; /* Metro dependency 4833 */
function _fun113494(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15211:6, offset: 0x023fc6b5, size: 265 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const referencedMessageStore = importDefault(4833) /* metro dependency 4833: ReferencedMessageStore */;
const env0_4 = (require(4833) /* metro dependency 4833: ReferencedMessageStore */).ReferencedMessageState;
const messageStore = importDefault(4814) /* metro dependency 4814: MessageStore */;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
let value = importDefault(8177) /* metro dependency 8177: RowGenerator */;
ReactModule;
let value = RowGenerator;
value = new value();
value.setOptions({'renderCodedLinks': false, 'renderGiftCode': false, 'renderActivityInstanceEmbed': false,
'renderActivityInviteEmbed': false, 'renderEmbeds': true, 'ignoreMentioned': true,
'inlineAttachmentMedia': true, 'inlineEmbedMedia': true, 'renderReactions': false, 'renderReplies': true,
'renderThreadEmbeds': false});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/threads/native/components/ThreadParentMessage.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/threads/native/components/ThreadParentMessage.tsx');
exports.ThreadChannelStarterMessage = ThreadChannelStarterMessage;
exports.ThreadCreationStarterMessage = ThreadCreationStarterMessage;
}
function ThreadChannelStarterMessage({guildId, messageId, channelId}) { // fn#113495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15211:559, offset: 0x023fc7be, size: 224 bytes, params: 2, frame: 19
var r0;
var PressableOpacity;
var ChatItem;
const useStateFromStores = FluxModule.useStateFromStores;
let object = [ReferencedMessageStore];
let message = Reflect.apply(useStateFromStores, FluxModule, [object, function() {
return ReferencedMessageStore.getMessage(channelId, messageId);
}]);
const state = message?.state;
const LOADED = ReferencedMessageState.LOADED;
if (state !== LOADED) {
r0 = null;
} else {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
object = {accessibilityRole: 'button', onPress: onPress_113497};
ChatItem = importDefault(9773) /* metro dependency 9773: ChatItem */;
message = message.message;
r0 = (
<PressableOpacity {...object}>
<ChatItem rowGenerator={env0_7} message={message} />
</PressableOpacity>
);
}
return r0;
function ThreadChannelStarterMessageOnPress() { // fn#113497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15211:805, owner: ThreadChannelStarterMessage.onPress, offset: 0x023fc8be, size: 55 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = require(1230) /* metro dependency 1230: router_utils */;
value.transitionToGuild(guildId, channelId, messageId);
}
function ThreadChannelStarterMessage({guildId, messageId, channelId}) { // fn#113495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15211:559, offset: 0x023fc7be, size: 224 bytes, params: 2, frame: 19
var r0;
var PressableOpacity;
var ChatItem;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
let object = [ReferencedMessageStore];
let message = Reflect.apply(useStateFromStores, fluxModule, [object, function() {
return ReferencedMessageStore.getMessage(channelId, messageId);
}]);
const state = message?.state;
const LOADED = ReferencedMessageState.LOADED;
if (state !== LOADED) {
r0 = null;
} else {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
object = {accessibilityRole: 'button', onPress: onPress_113497};
ChatItem = importDefault(9773) /* metro dependency 9773: ChatItem */;
message = message.message;
r0 = <PressableOpacity {...object}><ChatItem rowGenerator={env0_7} message={message} /></PressableOpacity>;
}
return r0;
}
function ThreadCreationStarterMessage({messageId, channelId}) { // fn#113498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15211:933, offset: 0x023fc8f5, size: 134 bytes, params: 2, frame: 17
const message = (require(566) /* metro dependency 566: flux */).useStateFromStores([MessageStore], function() {
return MessageStore.getMessage(channelId, messageId);
});
return message == null ? null : ((Component) => <Component rowGenerator={env0_7} message={message} />)(importDefault(9773) /* metro dependency 9773: ChatItem */);
}
function ThreadCreationStarterMessage({messageId, channelId}) { // fn#113498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15211:933, offset: 0x023fc8f5, size: 134 bytes, params: 2, frame: 17
const message = (require(566) /* metro dependency 566: flux */).useStateFromStores([MessageStore], function() {
return MessageStore.getMessage(channelId, messageId);
});
return (
message == null
? null
: ((Component) => <Component rowGenerator={env0_7} message={message} />)(importDefault(9773) /* metro dependency 9773: ChatItem */)
);
}
function ThreadChannelStarterMessageOnPress() { // fn#113497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15211:805, owner: ThreadChannelStarterMessage.onPress, offset: 0x023fc8be, size: 55 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = require(1230) /* metro dependency 1230: router_utils */;
value.transitionToGuild(guildId, channelId, messageId);
}
global.__d(_fun113494, 15014, [31, 4833, 4814, 33, 8177, 566, 5278, 1230, 9773,
2]) /* metro module 15014, dependencies: [31, 4833, 4814, 33, 8177, 566, 5278, 1230, 9773, 2] */;
@@ -1,4 +1,20 @@
/* Metro module 15095; source: modules/threads/native/components/redesign/ThreadList.tsx; dependencies: [31, 27, 33, 4501, 4573, 15096, 4017, 4508, 4577, 4581, 12057, 1388, 1390, 1244, 6238, 7975, 11757, 15098, 15099, 8416, 2] */
import ReanimatedRexport from '../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
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 IndexNativeModule from '../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ThreadSortOrderModule from '../../../../../external/discord_common/js/shared/shared-constants/ThreadSortOrder.tsx'; /* Metro dependency 1388 */
import * as ThreadSearchTagSettingModule from '../../../../../external/discord_common/js/shared/shared-constants/ThreadSearchTagSetting.tsx'; /* Metro dependency 1390 */
import * as ReanimatedRexportModule from '../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TransitionGroupModule from '../../../../../design/components/TransitionGroup/TransitionGroup.tsx'; /* Metro dependency 4508 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as SpringModule from '../../../../../design/animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
import * as SpringPresetsModule from '../../../../../design/animation/reanimated/spring/springPresets.tsx'; /* Metro dependency 4581 */
import * as ThreadBrowserHooksModule from '../../../ThreadBrowserHooks.tsx'; /* Metro dependency 12057 */
function _fun114198(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15292:6, offset: 0x024173df, size: 439 bytes, params: 8, frame: 20
const env0_0 = require;
const keyExtractor_114201 = function(a0) {
@@ -15,12 +31,7 @@ function _fun114198(global, require, importDefault, importAll, module, exports,
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const value = require(27) /* metro dependency 27 */;
const env0_4 = value.StyleSheet;
const env0_5 = value.View;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'flex': 1,
const env0_7 = (CreateStylesModule).createStyles({container: {'flex': 1,
'flexGrow': 1}, center: {'justifyContent': 'center', 'alignItems': 'center'}, header: {'marginTop': 24,
'marginBottom': 10}, footer: {'marginVertical': 16, 'justifyContent': 'center', 'alignItems': 'center'},
section: {'marginTop': 16, 'marginBottom': 8}});
@@ -29,295 +40,294 @@ function _fun114198(global, require, importDefault, importAll, module, exports,
object = {code: "function ThreadListTsx1(){const{withSpring,opacity,springStandard,state,TransitionStates,runOnJS,cleanUp}=this.__closure;return{opacity:withSpring(opacity.get(),springStandard,'respect-motion-settings',function(finished){if(finished&&state===TransitionStates.YEETED){runOnJS(cleanUp)();}})};}"};
object = {code: 'function ThreadListTsx2(finished){const{state,TransitionStates,runOnJS,cleanUp}=this.__closure;if(finished&&state===TransitionStates.YEETED){runOnJS(cleanUp)();}}'};
object = {LIST: 'list', EMPTY: 'empty', LOADING: 'loading'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/threads/native/components/redesign/ThreadList.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/threads/native/components/redesign/ThreadList.tsx');
exports.default = ThreadList;
}
function ThreadListSection({title}) { // fn#114199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15292:421, offset: 0x02417596, size: 98 bytes, params: 2, frame: 16
const styles = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
style={styles.section}
accessibilityRole="header"
variant="text-xs/bold"
color="text-default"
>
{title.toUpperCase()}
</Text>
);
}
function renderItem_114200({item}) { // fn#114200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15292:606, offset: 0x024175f8, size: 142 bytes, params: 2, frame: 15
const type = item.type;
if (type === 'section') {
return <ThreadListSection title={item.title} />;
function ThreadListSection({title}) { // fn#114199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15292:421, offset: 0x02417596, size: 98 bytes, params: 2, frame: 16
const styles = useStyles();
const Text = (TextModule).Text;
return (
<Text
style={styles.section}
accessibilityRole="header"
variant="text-xs/bold"
color="text-default"
>
{title.toUpperCase()}
</Text>
);
}
if (type === 'thread') {
return ((Component) => <Component threadId={item.threadId} onPress={item.onPress} start={item.start} end={item.end} />)(importDefault(15096) /* metro dependency 15096: ThreadListTableRow */);
}
}
function EnterExitCrossFadeContainer({contentContainerStyle, cleanUp, state, children}) { // fn#114202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15292:1389, offset: 0x024176b1, size: 396 bytes, params: 2, frame: 26
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useSharedValue = reanimatedRexportModule.useSharedValue;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
const MOUNTED = TransitionStates.MOUNTED;
const value4 = Reflect.apply(useSharedValue, reanimatedRexportModule, [state !== MOUNTED ? 0 : 1]);
const moduleValue2 = reanimatedRexportModule;
const useAnimatedStyle = moduleValue2.useAnimatedStyle;
const closure = EnterExitCrossFadeContainerP;
const object2 = {};
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.opacity = value4;
object2.springStandard = (require(4581) /* metro dependency 4581: springPresets */).springStandard;
object2.state = state;
object2.TransitionStates = TransitionStates;
object2.runOnJS = reanimatedRexportModule.runOnJS;
object2.cleanUp = cleanUp;
closure.__closure = object2;
closure.__workletHash = 5037750127944;
closure.__initData = env0_9;
const value5 = Reflect.apply(useAnimatedStyle, moduleValue2, [closure]);
env0_3.useEffect(_fun114205, [value4, state]);
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<View2 style={[StyleSheet.absoluteFill, value5]}>
<View style={contentContainerStyle}>
{children}
</View>
</View2>
);
}
function ThreadList({channel, onThreadPress, onCreateThreadPress, contentContainerStyle}) { // fn#114207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15292:2528, offset: 0x024179b0, size: 525 bytes, params: 2, frame: 30
const styles = useStyles();
const env0_3 = styles;
const {joinedThreadIds,
unjoinedThreadIds} = (require(12057) /* metro dependency 12057: ThreadBrowserHooks */).useActiveThreads(channel);
const threadBrowserHooksModule = require(12057) /* metro dependency 12057: ThreadBrowserHooks */;
const useArchivedThreads = threadBrowserHooksModule.useArchivedThreads;
const ThreadSortOrder = (require(1388) /* metro dependency 1388: ThreadSortOrder */).ThreadSortOrder;
const LATEST_ACTIVITY = ThreadSortOrder.LATEST_ACTIVITY;
const binding = env0_8;
const ThreadSearchTagSetting = (require(1390) /* metro dependency 1390: ThreadSearchTagSetting */).ThreadSearchTagSetting;
const MATCH_SOME = ThreadSearchTagSetting.MATCH_SOME;
const {threadIds, canLoadMore, loadMore, loading} = Reflect.apply(useArchivedThreads, threadBrowserHooksModule,
[channel, LATEST_ACTIVITY, binding, MATCH_SOME]);
const value4 = env0_3.useCallback(function() {
if (!loading && canLoadMore) {
loadMore();
function renderItem_114200({item}) { // fn#114200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15292:606, offset: 0x024175f8, size: 142 bytes, params: 2, frame: 15
const type = item.type;
if (type === 'section') {
return <ThreadListSection title={item.title} />;
}
if (type === 'thread') {
return ((Component) => <Component threadId={item.threadId} onPress={item.onPress} start={item.start} end={item.end} />)(importDefault(15096) /* metro dependency 15096: ThreadListTableRow */);
}
}, [loading, canLoadMore, loadMore]);
const value5 = env0_3.useMemo(_fun114209, [threadIds, joinedThreadIds, onThreadPress, unjoinedThreadIds]);
const value6 = env0_3.useMemo(_fun114213, [value5.length, loading]);
const value8 = env0_3.useCallback(_fun114215, [contentContainerStyle, value5, loading, onCreateThreadPress, value4,
styles.center, styles.container, styles.header, styles.footer, env0_3.useMemo(_fun114214,
[onCreateThreadPress])]);
const TransitionGroup = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionGroup;
return (
<TransitionGroup
items={value6}
renderItem={value8}
getItemKey={getThreadListStateKey}
/>
);
}
function EnterExitCrossFadeContainerP() { // fn#114203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15292:1586, owner: EnterExitCrossFadeContainer.p, offset: 0x0241783d, size: 195 bytes, params: 1, frame: 24
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
const value3 = env0_2.get();
const springStandard = (require(4581) /* metro dependency 4581: springPresets */).springStandard;
const closure = pT_114204;
const object = {};
object.state = state;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
object.TransitionStates = TransitionStates;
object.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object.cleanUp = cleanUp;
closure.__closure = object;
closure.__workletHash = 2519144051135;
closure.__initData = env1_10;
return {opacity: Reflect.apply(withSpring, springModule, [value3, springStandard, 'respect-motion-settings',
closure])};
}
function _fun114205() { // fn#114205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15292:2158, offset: 0x0241796b, size: 69 bytes, params: 1, frame: 14
const binding = env0_2;
const set = binding.set;
const stateBinding = state;
const value = environment.__proto__;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
const YEETED = TransitionStates.YEETED;
Reflect.apply(set, binding, [stateBinding !== YEETED ? 1 : 0]);
}
function _fun114209() { // fn#114209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15292:2937, offset: 0x02417bdf, size: 401 bytes, params: 1, frame: 21
var environment;
var push;
var value2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var formatToPlainString;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var fcXlhe;
var value3;
var GHY7yQ;
var value4;
const items2 = [];
if (joinedThreadIds.length > 0) {
push = items2.push;
value2 = environment.__proto__;
formatToPlainString = intl.formatToPlainString;
fcXlhe = t.fcXlhe;
joinedThreadIdsBinding = joinedThreadIds;
Reflect.apply(push, items2, [{type: 'section', title: Reflect.apply(formatToPlainString, intl, [fcXlhe,
{count: joinedThreadIdsBinding.length}])}]);
joinedThreadIdsBinding.forEach(_fun114210);
}
if (unjoinedThreadIds.length > 0) {
push = items2.push;
value3 = environment.__proto__;
formatToPlainString = intl.formatToPlainString;
GHY7yQ = t.GHY7yQ;
unjoinedThreadIdsBinding = unjoinedThreadIds;
Reflect.apply(push, items2, [{type: 'section', title: Reflect.apply(formatToPlainString, intl, [GHY7yQ,
{count: unjoinedThreadIdsBinding.length}])}]);
unjoinedThreadIdsBinding.forEach(_fun114211);
}
if (threadIds.length > 0) {
push = items2.push;
value4 = environment.__proto__;
Reflect.apply(push, items2, [{type: 'section', title: intl.string(t.XsgrjS)}]);
threadIds.forEach(_fun114212);
}
return items2;
}
function _fun114213() { // fn#114213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15292:3589, offset: 0x02417e6f, size: 115 bytes, params: 1, frame: 3
return loading && env0_11.length === 0 ? [env1_11.LOADING] : env0_11.length === 0 ? [env1_11.EMPTY] : [env1_11.LIST];
}
function _fun114214() { // fn#114214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15292:3681, offset: 0x02417ee2, size: 202 bytes, params: 1, frame: 21
var r0;
var value3;
var TableRow;
var object;
var intl;
const onCreateThreadPressBinding = onCreateThreadPress;
const value2 = null;
if (value2 != onCreateThreadPressBinding) {
value3 = environment.__proto__;
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
var tableRowProps = {'icon': null, 'onPress': null, 'label': null, 'start': true, 'end': true, 'arrow': true,
icon: ((Icon) => <Icon IconComponent={(require(11757) /* metro dependency 11757: ThreadPlusIcon */).ThreadPlusIcon} />)((require(7975) /* metro dependency 7975: RowButtonNative */).RowButton.Icon),
onPress: onCreateThreadPress};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
tableRowProps.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.rBIGBL);
r0 = <TableRow {...tableRowProps} />;
} else {
r0 = value2;
}
return r0;
}
function _fun114215(a0, a1, a2, a3) { // fn#114215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15292:3897, offset: 0x02417fac, size: 544 bytes, params: 5, frame: 27
var object2;
var stylesBinding;
var value3;
var AnimatedFlashList;
var intl;
const value = environment.__proto__;
const EMPTY = env1_11.EMPTY;
if (EMPTY === a1) {
function EnterExitCrossFadeContainer({contentContainerStyle, cleanUp, state, children}) { // fn#114202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15292:1389, offset: 0x024176b1, size: 396 bytes, params: 2, frame: 26
const useSharedValue = ReanimatedRexportModule.useSharedValue;
const TransitionStates = (TransitionGroupModule).TransitionStates;
const MOUNTED = TransitionStates.MOUNTED;
const value4 = Reflect.apply(useSharedValue, ReanimatedRexportModule, [state !== MOUNTED ? 0 : 1]);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const EnterExitCrossFadeContainerP2 = EnterExitCrossFadeContainerP;
const object = {};
object.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object.opacity = value4;
object.springStandard = (require(4581) /* metro dependency 4581: springPresets */).springStandard;
object.state = state;
object.TransitionStates = TransitionStates;
object.runOnJS = ReanimatedRexportModule.runOnJS;
object.cleanUp = cleanUp;
EnterExitCrossFadeContainerP2.__closure = object;
EnterExitCrossFadeContainerP2.__workletHash = 5037750127944;
EnterExitCrossFadeContainerP2.__initData = env0_9;
const value5 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [EnterExitCrossFadeContainerP2]);
ReactModule.useEffect(_fun114205, [value4, state]);
const View2 = (ReanimatedRexport).View;
return (
<EnterExitCrossFadeContainer
contentContainerStyle={styles.container}
state={a2}
cleanUp={a3}
key={a0}
>
{((Component) => <Component onCreateThreadPress={onCreateThreadPress} />)(importDefault(15098) /* metro dependency 15098: ThreadListEmpty */)}
</EnterExitCrossFadeContainer>
<View2 style={[StyleSheet.absoluteFill, value5]}>
<View style={contentContainerStyle}>
{children}
</View>
</View2>
);
function EnterExitCrossFadeContainerP() { // fn#114203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15292:1586, owner: EnterExitCrossFadeContainer.p, offset: 0x0241783d, size: 195 bytes, params: 1, frame: 24
const withSpring = SpringModule.withSpring;
const value3 = env0_2.get();
const springStandard = (SpringPresetsModule).springStandard;
const pT_1142042 = pT_114204;
const object2 = {};
object2.state = state;
const TransitionStates = (TransitionGroupModule).TransitionStates;
object2.TransitionStates = TransitionStates;
object2.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object2.cleanUp = cleanUp;
pT_1142042.__closure = object2;
pT_1142042.__workletHash = 2519144051135;
pT_1142042.__initData = env1_10;
return {opacity: Reflect.apply(withSpring, SpringModule, [value3, springStandard, 'respect-motion-settings',
pT_1142042])};
function pT_114204(a0) { // fn#114204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15292:1685, owner: EnterExitCrossFadeContainer.p.t, offset: 0x02417900, size: 107 bytes, params: 2, frame: 13
var r0;
var stateBinding;
var runOnJS;
var value2;
let value = a0;
if (value) {
value = environment.__proto__;
stateBinding = state;
value = environment.__proto__.__proto__;
value = stateBinding === (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates.YEETED;
r0 = value;
} else {
r0 = value;
}
if (r0) {
value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__;
Reflect.apply(runOnJS, value, [cleanUp])();
}
}
}
function _fun114205() { // fn#114205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15292:2158, offset: 0x0241796b, size: 69 bytes, params: 1, frame: 14
const binding = env0_2;
const set = binding.set;
const stateBinding = state;
const value = environment.__proto__;
const TransitionStates = (TransitionGroupModule).TransitionStates;
const YEETED = TransitionStates.YEETED;
Reflect.apply(set, binding, [stateBinding !== YEETED ? 1 : 0]);
}
}
const LOADING = env1_11.LOADING;
if (LOADING === a1) {
stylesBinding = styles;
function ThreadList({channel, onThreadPress, onCreateThreadPress, contentContainerStyle}) { // fn#114207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15292:2528, offset: 0x024179b0, size: 525 bytes, params: 2, frame: 30
const styles = useStyles();
const styles2 = styles;
const {joinedThreadIds,
unjoinedThreadIds} = (ThreadBrowserHooksModule).useActiveThreads(channel);
const useArchivedThreads = ThreadBrowserHooksModule.useArchivedThreads;
const ThreadSortOrder = (ThreadSortOrderModule).ThreadSortOrder;
const LATEST_ACTIVITY = ThreadSortOrder.LATEST_ACTIVITY;
const binding = env0_8;
const ThreadSearchTagSetting = (ThreadSearchTagSettingModule).ThreadSearchTagSetting;
const MATCH_SOME = ThreadSearchTagSetting.MATCH_SOME;
const {threadIds, canLoadMore, loadMore, loading} = Reflect.apply(useArchivedThreads, ThreadBrowserHooksModule,
[channel, LATEST_ACTIVITY, binding, MATCH_SOME]);
const value4 = styles2.useCallback(function() {
if (!loading && canLoadMore) {
loadMore();
}
}, [loading, canLoadMore, loadMore]);
const value5 = styles2.useMemo(_fun114209, [threadIds, joinedThreadIds, onThreadPress, unjoinedThreadIds]);
const value6 = styles2.useMemo(_fun114213, [value5.length, loading]);
const value8 = styles2.useCallback(_fun114215, [contentContainerStyle, value5, loading, onCreateThreadPress, value4,
styles.center, styles.container, styles.header, styles.footer, styles2.useMemo(_fun114214,
[onCreateThreadPress])]);
const TransitionGroup = (TransitionGroupModule).TransitionGroup;
return (
<EnterExitCrossFadeContainer
contentContainerStyle={[stylesBinding.container, stylesBinding.center]}
state={a2}
cleanUp={a3}
key={a0}
>
{((Component) => <Component />)(importDefault(15099) /* metro dependency 15099: ThreadListLoadingIndicator */)}
</EnterExitCrossFadeContainer>
);
}
const LIST = env1_11.LIST;
if (LIST === a1) {
object2 = {};
stylesBinding = styles;
object2.contentContainerStyle = stylesBinding.container;
object2.state = a2;
object2.cleanUp = a3;
value3 = undefined;
AnimatedFlashList = (require(8416) /* metro dependency 8416: flashList */).AnimatedFlashList;
var animatedFlashListProps = {data: env0_11, ListHeaderComponent: env0_12,
ListHeaderComponentStyle: stylesBinding.header, renderItem: renderItem_114200,
keyExtractor: keyExtractor_114201, onEndReached: env0_10, onEndReachedThreshold: 0.4};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
animatedFlashListProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.B2panI);
animatedFlashListProps.estimatedItemSize = 64;
animatedFlashListProps.ListFooterComponent = loading ? importDefault(15099) /* metro dependency 15099: ThreadListLoadingIndicator */ : value3;
animatedFlashListProps.ListFooterComponentStyle = loading ? styles.footer : value3;
animatedFlashListProps.contentContainerStyle = contentContainerStyle;
return (
<EnterExitCrossFadeContainer {...object2} key={a0}>
<AnimatedFlashList {...animatedFlashListProps} />
</EnterExitCrossFadeContainer>
<TransitionGroup
items={value6}
renderItem={value8}
getItemKey={getThreadListStateKey}
/>
);
function _fun114209() { // fn#114209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15292:2937, offset: 0x02417bdf, size: 401 bytes, params: 1, frame: 21
var environment;
var push;
var value2;
const intl = (IndexNativeModule).intl;
var formatToPlainString;
const t = (IndexNativeModule).t;
var fcXlhe;
var value3;
var GHY7yQ;
var value4;
const items2 = [];
if (joinedThreadIds.length > 0) {
push = items2.push;
value2 = environment.__proto__;
formatToPlainString = intl.formatToPlainString;
fcXlhe = t.fcXlhe;
joinedThreadIdsBinding = joinedThreadIds;
Reflect.apply(push, items2, [{type: 'section', title: Reflect.apply(formatToPlainString, intl, [fcXlhe,
{count: joinedThreadIdsBinding.length}])}]);
joinedThreadIdsBinding.forEach(_fun114210);
}
if (unjoinedThreadIds.length > 0) {
push = items2.push;
value3 = environment.__proto__;
formatToPlainString = intl.formatToPlainString;
GHY7yQ = t.GHY7yQ;
unjoinedThreadIdsBinding = unjoinedThreadIds;
Reflect.apply(push, items2, [{type: 'section', title: Reflect.apply(formatToPlainString, intl, [GHY7yQ,
{count: unjoinedThreadIdsBinding.length}])}]);
unjoinedThreadIdsBinding.forEach(_fun114211);
}
if (threadIds.length > 0) {
push = items2.push;
value4 = environment.__proto__;
Reflect.apply(push, items2, [{type: 'section', title: intl.string(t.XsgrjS)}]);
threadIds.forEach(_fun114212);
}
return items2;
function _fun114210(a0, a1) { // fn#114210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15292:3083, offset: 0x02417d70, size: 85 bytes, params: 3, frame: 15
return env0_0.push({type: 'thread', threadId: a0, start: a1 === 0, end: a1 === joinedThreadIds.length - 1,
onPress: onThreadPress});
}
function _fun114211(a0, a1) { // fn#114211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15292:3294, offset: 0x02417dc5, size: 85 bytes, params: 3, frame: 15
return env0_0.push({type: 'thread', threadId: a0, start: a1 === 0, end: a1 === unjoinedThreadIds.length - 1,
onPress: onThreadPress});
}
function _fun114212(a0, a1) { // fn#114212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15292:3475, offset: 0x02417e1a, size: 85 bytes, params: 3, frame: 15
return env0_0.push({type: 'thread', threadId: a0, start: a1 === 0, end: a1 === threadIds.length - 1,
onPress: onThreadPress});
}
}
function _fun114213() { // fn#114213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15292:3589, offset: 0x02417e6f, size: 115 bytes, params: 1, frame: 3
return loading && env0_11.length === 0 ? [env1_11.LOADING] : env0_11.length === 0 ? [env1_11.EMPTY] : [env1_11.LIST];
}
function _fun114214() { // fn#114214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15292:3681, offset: 0x02417ee2, size: 202 bytes, params: 1, frame: 21
var r0;
var value3;
var TableRow;
var object2;
var intl;
const onCreateThreadPressBinding = onCreateThreadPress;
const value2 = null;
if (value2 != onCreateThreadPressBinding) {
value3 = environment.__proto__;
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
var tableRowProps = {'icon': null, 'onPress': null, 'label': null, 'start': true, 'end': true, 'arrow': true,
icon: ((Icon) => <Icon IconComponent={(require(11757) /* metro dependency 11757: ThreadPlusIcon */).ThreadPlusIcon} />)((require(7975) /* metro dependency 7975: RowButtonNative */).RowButton.Icon),
onPress: onCreateThreadPress};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
tableRowProps.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.rBIGBL);
r0 = <TableRow {...tableRowProps} />;
} else {
r0 = value2;
}
return r0;
}
function _fun114215(a0, a1, a2, a3) { // fn#114215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15292:3897, offset: 0x02417fac, size: 544 bytes, params: 5, frame: 27
var object;
var stylesBinding;
var value3;
var AnimatedFlashList;
var intl;
const value = environment.__proto__;
const EMPTY = env1_11.EMPTY;
if (EMPTY === a1) {
return (
<EnterExitCrossFadeContainer
contentContainerStyle={styles.container}
state={a2}
cleanUp={a3}
key={a0}
>
{((Component) => <Component onCreateThreadPress={onCreateThreadPress} />)(importDefault(15098) /* metro dependency 15098: ThreadListEmpty */)}
</EnterExitCrossFadeContainer>
);
}
const LOADING = env1_11.LOADING;
if (LOADING === a1) {
stylesBinding = styles;
return (
<EnterExitCrossFadeContainer
contentContainerStyle={[stylesBinding.container, stylesBinding.center]}
state={a2}
cleanUp={a3}
key={a0}
>
{((Component) => <Component />)(importDefault(15099) /* metro dependency 15099: ThreadListLoadingIndicator */)}
</EnterExitCrossFadeContainer>
);
}
const LIST = env1_11.LIST;
if (LIST === a1) {
object = {};
stylesBinding = styles;
object.contentContainerStyle = stylesBinding.container;
object.state = a2;
object.cleanUp = a3;
value3 = undefined;
AnimatedFlashList = (require(8416) /* metro dependency 8416: flashList */).AnimatedFlashList;
var animatedFlashListProps = {data: env0_11, ListHeaderComponent: env0_12,
ListHeaderComponentStyle: stylesBinding.header, renderItem: renderItem_114200,
keyExtractor: keyExtractor_114201, onEndReached: env0_10, onEndReachedThreshold: 0.4};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
animatedFlashListProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.B2panI);
animatedFlashListProps.estimatedItemSize = 64;
animatedFlashListProps.ListFooterComponent = loading ? importDefault(15099) /* metro dependency 15099: ThreadListLoadingIndicator */ : value3;
animatedFlashListProps.ListFooterComponentStyle = loading ? styles.footer : value3;
animatedFlashListProps.contentContainerStyle = contentContainerStyle;
return (
<EnterExitCrossFadeContainer {...object} key={a0}>
<AnimatedFlashList {...animatedFlashListProps} />
</EnterExitCrossFadeContainer>
);
}
}
}
}
function pT_114204(a0) { // fn#114204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15292:1685, owner: EnterExitCrossFadeContainer.p.t, offset: 0x02417900, size: 107 bytes, params: 2, frame: 13
var r0;
var stateBinding;
var runOnJS;
var value2;
let value = a0;
if (value) {
value = environment.__proto__;
stateBinding = state;
value = environment.__proto__.__proto__;
value = stateBinding === (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates.YEETED;
r0 = value;
} else {
r0 = value;
}
if (r0) {
value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__;
Reflect.apply(runOnJS, value, [cleanUp])();
}
}
function _fun114210(a0, a1) { // fn#114210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15292:3083, offset: 0x02417d70, size: 85 bytes, params: 3, frame: 15
return env0_0.push({type: 'thread', threadId: a0, start: a1 === 0, end: a1 === joinedThreadIds.length - 1,
onPress: onThreadPress});
}
function _fun114211(a0, a1) { // fn#114211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15292:3294, offset: 0x02417dc5, size: 85 bytes, params: 3, frame: 15
return env0_0.push({type: 'thread', threadId: a0, start: a1 === 0, end: a1 === unjoinedThreadIds.length - 1,
onPress: onThreadPress});
}
function _fun114212(a0, a1) { // fn#114212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15292:3475, offset: 0x02417e1a, size: 85 bytes, params: 3, frame: 15
return env0_0.push({type: 'thread', threadId: a0, start: a1 === 0, end: a1 === threadIds.length - 1,
onPress: onThreadPress});
}
global.__d(_fun114198, 15095, [31, 27, 33, 4501, 4573, 15096, 4017, 4508, 4577, 4581, 12057, 1388, 1390, 1244, 6238,
7975, 11757, 15098, 15099, 8416,
2]) /* metro module 15095, dependencies: [31, 27, 33, 4501, 4573, 15096, 4017, 4508, 4577, 4581, 12057, 1388, 1390, 1244, 6238, 7975, 11757, 15098, 15099, 8416, 2] */;
@@ -1,60 +1,93 @@
/* Metro module 15098; source: modules/threads/native/components/redesign/ThreadListEmpty.tsx; dependencies: [31, 27, 33, 4501, 697, 1305, 11758, 4573, 1244, 4578, 2] */
import Module11758 from '../../../../../by-id/module-11758.js'; /* Metro dependency 11758 */
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 NativeModule from '../../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _fun114240(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114240, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15295:6, offset: 0x0241910a, size: 325 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const value2 = require(33) /* metro dependency 33 */;
const env0_4 = value2.jsx;
const env0_5 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {};
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
const object2 = {};
const BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
object.backgroundColor = BACKGROUND_MOD_SUBTLE;
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object.padding = 12;
const env0_6 = Reflect.apply(createStyles, createStylesModule, [{container: {'flex': 1, 'justifyContent': 'center',
'alignItems': 'center'}, iconWrapper: object, title: {'textAlign': 'center', 'marginTop': 16,
object2.backgroundColor = BACKGROUND_MOD_SUBTLE;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object2.padding = 12;
const env0_6 = Reflect.apply(createStyles, CreateStylesModule, [{container: {'flex': 1, 'justifyContent': 'center',
'alignItems': 'center'}, iconWrapper: object2, title: {'textAlign': 'center', 'marginTop': 16,
'marginHorizontal': 16}, subtext: {'textAlign': 'center', 'marginTop': 4, 'marginHorizontal': 16,
'marginBottom': 16}}]);
value = value.memo(_fun114241);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/threads/native/components/redesign/ThreadListEmpty.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/threads/native/components/redesign/ThreadListEmpty.tsx');
exports.default = value;
}
function _fun114241({onCreateThreadPress}) { // fn#114241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15295:495, offset: 0x0241924f, size: 477 bytes, params: 2, frame: 27
var r5;
var Button;
var object6;
const styles = useStyles();
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const iconProps = {source: importDefault(11758) /* metro dependency 11758 */};
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
const Sizes = Icon2.Sizes;
const MEDIUM = Sizes.MEDIUM;
iconProps.size = MEDIUM;
const items2 = [<View style={styles.iconWrapper}><Icon {...iconProps} /></View>];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const HgTQ8p = (require(1244) /* metro dependency 1244: indexNative */).t.HgTQ8p;
items2[1] = <Text style={styles.title} accessibilityRole="header" maxFontSizeMultiplier={2} variant="heading-lg/semibold" color="mobile-text-heading-primary">{Reflect.apply(string,
intl, [HgTQ8p])}</Text>;
items2[2] = <Text style={styles.subtext} maxFontSizeMultiplier={2} variant="text-sm/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jmq9GC)}</Text>;
const value3 = onCreateThreadPress != null;
if (value3) {
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
r5 = <Button onPress={onCreateThreadPress} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.rBIGBL)} />;
} else {
r5 = value3;
function _fun114241({onCreateThreadPress}) { // fn#114241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15295:495, offset: 0x0241924f, size: 477 bytes, params: 2, frame: 27
var r5;
var Button;
var object;
const styles = useStyles();
const Icon = (NativeModule).Icon;
const iconProps = {source: Module11758};
const Icon2 = (NativeModule).Icon;
const Sizes = Icon2.Sizes;
const MEDIUM = Sizes.MEDIUM;
iconProps.size = MEDIUM;
const items2 = [
<View style={styles.iconWrapper}>
<Icon {...iconProps} />
</View>,
];
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const HgTQ8p = (require(1244) /* metro dependency 1244: indexNative */).t.HgTQ8p;
items2[1] = (
<Text
style={styles.title}
accessibilityRole="header"
maxFontSizeMultiplier={2}
variant="heading-lg/semibold"
color="mobile-text-heading-primary"
>
{Reflect.apply(string, intl, [HgTQ8p])}
</Text>
);
items2[2] = (
<Text
style={styles.subtext}
maxFontSizeMultiplier={2}
variant="text-sm/medium"
color="text-default"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jmq9GC)}
</Text>
);
const value3 = onCreateThreadPress != null;
if (value3) {
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
r5 = (
<Button
onPress={onCreateThreadPress}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.rBIGBL)}
/>
);
} else {
r5 = value3;
}
items2[3] = r5;
return (
<View style={styles.container}>
{items2}
</View>
);
}
items2[3] = r5;
return (
<View style={styles.container}>
{items2}
</View>
);
}
global.__d(_fun114240, 15098, [31, 27, 33, 4501, 697, 1305, 11758, 4573, 1244, 4578,
2]) /* metro module 15098, dependencies: [31, 27, 33, 4501, 697, 1305, 11758, 4573, 1244, 4578, 2] */;
@@ -1,18 +1,25 @@
/* Metro module 15099; source: modules/threads/native/components/redesign/ThreadListLoadingIndicator.tsx; dependencies: [31, 33, 4501, 10686, 2] */
import MessageLoadingSpinner from '../../../../../components_native/common/MessageLoadingSpinner.tsx'; /* Metro dependency 10686 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
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 CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun114242(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15296:6, offset: 0x0241942c, size: 191 bytes, params: 8, frame: 20
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_2 = (require(33) /* metro dependency 33 */).jsx;
const env0_3 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({spinner: {'width': 32,
let value = ReactModule;
const env0_3 = (CreateStylesModule).createStyles({spinner: {'width': 32,
'height': 32}});
value = value.memo(_fun114243);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/threads/native/components/redesign/ThreadListLoadingIndicator.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/threads/native/components/redesign/ThreadListLoadingIndicator.tsx');
exports.default = value;
function _fun114243() { // fn#114243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15296:185, offset: 0x024194eb, size: 64 bytes, params: 1, frame: 15
const styles = useStyles();
return ((Component) => <Component style={styles.spinner} animate />)(MessageLoadingSpinner);
}
}
function _fun114243() { // fn#114243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15296:185, offset: 0x024194eb, size: 64 bytes, params: 1, frame: 15
const styles = useStyles();
return ((Component) => <Component style={styles.spinner} animate />)(importDefault(10686) /* metro dependency 10686: MessageLoadingSpinner */);
}
global.__d(_fun114242, 15099, [31, 33, 4501, 10686,
2]) /* metro module 15099, dependencies: [31, 33, 4501, 10686, 2] */;
@@ -1,53 +1,78 @@
/* Metro module 15096; source: modules/threads/native/components/redesign/ThreadListTableRow.tsx; dependencies: [31, 27, 1379, 33, 4501, 6238, 15097, 566, 2] */
import ChannelStore from '../../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
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 CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TableRowNativeModule from '../../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as ThreadBrowserRowSubtextModule from '../ThreadBrowserRowSubtext.tsx'; /* Metro dependency 15097 */
function _fun114216(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15293:6, offset: 0x024181cc, size: 243 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({subLabel: {'maxWidth': '100%',
let value = ReactModule;
const env0_6 = (CreateStylesModule).createStyles({subLabel: {'maxWidth': '100%',
'marginTop': 2}});
value = value.memo(_fun114220);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/threads/native/components/redesign/ThreadListTableRow.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/threads/native/components/redesign/ThreadListTableRow.tsx');
exports.default = value;
}
function ThreadListTableRow({thread, onPress, start, end}) { // fn#114217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15293:210, offset: 0x024182bf, size: 224 bytes, params: 2, frame: 24
const styles = useStyles();
const value2 = env0_2.useMemo(function() {
if (onPress != null) {
return _fun114219;
}
}, [onPress, thread.id]);
const TableRow = (TableRowNativeModule).TableRow;
const name = thread.name;
const ThreadSubtext = (ThreadBrowserRowSubtextModule).ThreadSubtext;
return (
<TableRow
label={name}
subLabel={<View style={styles.subLabel}>
<ThreadSubtext thread={thread} />
</View>}
onPress={value2}
start={start}
end={end}
arrow
/>
);
function _fun114218() { // fn#114218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15293:297, offset: 0x0241839f, size: 28 bytes, params: 1, frame: 2
if (onPress != null) {
return function() {
return onPress(thread.id);
};
}
function _fun114219() { // fn#114219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15293:319, offset: 0x024183bb, size: 25 bytes, params: 1, frame: 11
return onPress(thread.id);
}
function ThreadListTableRow({thread, onPress, start, end}) { // fn#114217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15293:210, offset: 0x024182bf, size: 224 bytes, params: 2, frame: 24
const styles = useStyles();
const value2 = env0_2.useMemo(function() {
if (onPress != null) {
return _fun114219;
}
}, [onPress, thread.id]);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const name = thread.name;
const ThreadSubtext = (require(15097) /* metro dependency 15097: ThreadBrowserRowSubtext */).ThreadSubtext;
return (
<TableRow
label={name}
subLabel={<View style={styles.subLabel}><ThreadSubtext thread={thread} /></View>}
onPress={value2}
start={start}
end={end}
arrow
/>
);
}
function _fun114220({threadId, onPress, start, end}) { // fn#114220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15293:510, offset: 0x024183d4, size: 129 bytes, params: 2, frame: 19
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(threadId);
});
return channel == null ? null : <ThreadListTableRow thread={channel} start={start} end={end} onPress={onPress} />;
}
function _fun114218() { // fn#114218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15293:297, offset: 0x0241839f, size: 28 bytes, params: 1, frame: 2
if (onPress != null) {
return function() {
return onPress(thread.id);
};
}
function _fun114220({threadId, onPress, start, end}) { // fn#114220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15293:510, offset: 0x024183d4, size: 129 bytes, params: 2, frame: 19
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(threadId);
});
return (
channel == null
? null
: (
<ThreadListTableRow
thread={channel}
start={start}
end={end}
onPress={onPress}
/>
)
);
}
}
global.__d(_fun114216, 15096, [31, 27, 1379, 33, 4501, 6238, 15097, 566,
2]) /* metro module 15096, dependencies: [31, 27, 1379, 33, 4501, 6238, 15097, 566, 2] */;
@@ -1,23 +1,27 @@
/* Metro module 14534; source: modules/threads/native/components/showThreadLongPressActionSheet.tsx; dependencies: [4080, 14535, 1962, 2] */
import ActionSheetActionCreators from '../../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun109959(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109959, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14731:6, offset: 0x023634da, size: 103 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/threads/native/components/showThreadLongPressActionSheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/threads/native/components/showThreadLongPressActionSheet.tsx');
exports.default = showThreadLongPressActionSheet;
function showThreadLongPressActionSheet(a0) { // fn#109960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14731:204, offset: 0x02363541, size: 102 bytes, params: 2, frame: 16
const defaultImport = importDefault(dependencyMap[0]);
const openLazy = defaultImport.openLazy;
let value = require(dependencyMap[2]);
value = value(dependencyMap[1], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'ThreadLongPressActionSheet', {channelId: a0,
onClose: onClose_109961}]);
function showThreadLongPressActionSheetOnClose() { // fn#109961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14731:328, owner: showThreadLongPressActionSheet.onClose, offset: 0x023635a7, size: 43 bytes, params: 1, frame: 12
const value = environment.__proto__;
(ActionSheetActionCreators).hideActionSheet('ThreadLongPressActionSheet');
}
}
}
function showThreadLongPressActionSheet(a0) { // fn#109960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14731:204, offset: 0x02363541, size: 102 bytes, params: 2, frame: 16
const defaultImport = importDefault(dependencyMap[0]);
const openLazy = defaultImport.openLazy;
let value = require(dependencyMap[2]);
value = value(dependencyMap[1], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'ThreadLongPressActionSheet', {channelId: a0,
onClose: onClose_109961}]);
}
function showThreadLongPressActionSheetOnClose() { // fn#109961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14731:328, owner: showThreadLongPressActionSheet.onClose, offset: 0x023635a7, size: 43 bytes, params: 1, frame: 12
const value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet('ThreadLongPressActionSheet');
}
global.__d(_fun109959, 14534, [4080, 14535, 1962, 2]) /* metro module 14534, dependencies: [4080, 14535, 1962, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,120 +1,127 @@
/* Metro module 15012; source: modules/threads/native/components/thread_creation/ThreadCreationTitleInput.tsx; dependencies: [31, 1379, 661, 33, 15013, 7165, 7877, 566, 7876, 1244, 7981, 6619, 2] */
import ChannelStore from '../../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
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 ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as TextInputNativeModule from '../../../../../design/components/TextInput/native/TextInput.native.tsx'; /* Metro dependency 7981 */
import * as FormErrorModule from '../../../FormError.tsx'; /* Metro dependency 15013 */
function _fun113479(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15209:6, offset: 0x023fbf84, size: 201 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 channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_5 = (require(661) /* metro dependency 661: Constants */).MAX_CHANNEL_NAME_LENGTH;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
value = value.memo(value.forwardRef(_fun113480));
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/threads/native/components/thread_creation/ThreadCreationTitleInput.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/threads/native/components/thread_creation/ThreadCreationTitleInput.tsx');
exports.default = value;
}
function _fun113480({chatInputRef, threadSettingsDraft, threadNameError, optional}, a1) { // fn#113480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15209:180, offset: 0x023fc04d, size: 675 bytes, params: 3, frame: 28
var r5;
var moduleValue3;
const env0_2 = a1;
const value3 = (require(15013) /* metro dependency 15013: FormError */).renderError(threadNameError,
{content: threadSettingsDraft.name});
const binding = env0_3;
const value4 = binding.useRef(threadSettingsDraft.name);
const value5 = binding.useCallback(_fun113481, [threadSettingsDraft.parentChannelId]);
const value6 = binding.useCallback(_fun113482, [threadSettingsDraft]);
const value7 = binding.useCallback(function() {
var current = chatInputRef.current;
if (current != null) {
current.focus();
function _fun113480({chatInputRef, threadSettingsDraft, threadNameError, optional}, a1) { // fn#113480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15209:180, offset: 0x023fc04d, size: 675 bytes, params: 3, frame: 28
var r5;
var moduleValue3;
const env0_2 = a1;
const value3 = (FormErrorModule).renderError(threadNameError,
{content: threadSettingsDraft.name});
const binding = env0_3;
const value4 = binding.useRef(threadSettingsDraft.name);
const value5 = binding.useCallback(_fun113481, [threadSettingsDraft.parentChannelId]);
const value6 = binding.useCallback(_fun113482, [threadSettingsDraft]);
const value7 = binding.useCallback(function() {
var current = chatInputRef.current;
if (current != null) {
current.focus();
}
}, [chatInputRef]);
binding.useEffect(_fun113484, [threadSettingsDraft.name, a1]);
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(threadSettingsDraft.parentChannelId);
});
const value8 = '';
if (channel != null) {
moduleValue3 = require(7876) /* metro dependency 7876: ThreadCreationHooks */;
r5 = moduleValue3.getDefaultThreadName(channel, threadSettingsDraft.parentMessageId);
} else {
r5 = value8;
}
}, [chatInputRef]);
binding.useEffect(_fun113484, [threadSettingsDraft.name, a1]);
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(threadSettingsDraft.parentChannelId);
});
const value8 = '';
if (channel != null) {
moduleValue3 = require(7876) /* metro dependency 7876: ThreadCreationHooks */;
r5 = moduleValue3.getDefaultThreadName(channel, threadSettingsDraft.parentMessageId);
} else {
r5 = value8;
}
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const r13 = optional ? Reflect.apply(string, intl, [t.JPvIiL]) : Reflect.apply(string, intl, [t.j3XWjD]);
const TextInput = (require(7981) /* metro dependency 7981: TextInputNative */).TextInput;
const textInputProps = {defaultValue: (importDefault(6619) /* metro dependency 6619: useRefValue */)(value4),
errorMessage: value3, label: r13, accessibilityLabel: r13,
accessibilityHint: optional ? undefined : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/+VEZN']),
required: !optional, isClearable: true, autoFocus: true, maxLength: MAX_CHANNEL_NAME_LENGTH,
onSubmitEditing: value7, onBlur: value6, onChange: value5};
r5 = value8 === r5 ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['Nb2/RE']) : r5;
textInputProps.placeholder = r5;
textInputProps.ref = a1;
textInputProps.returnKeyType = 'next';
textInputProps.textContentType = 'none';
return <TextInput {...textInputProps} />;
}
function _fun113481(a0) { // fn#113481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15209:346, offset: 0x023fc2f0, size: 109 bytes, params: 2, frame: 19
var value2;
var defaultImport;
var changeThreadSettings;
var object2;
let parentChannelId = threadSettingsDraft.parentChannelId;
if (parentChannelId != null) {
value2 = environment.__proto__;
defaultImport = importDefault(7165) /* metro dependency 7165: DraftActionCreators */;
changeThreadSettings = defaultImport.changeThreadSettings;
parentChannelId = threadSettingsDraft.parentChannelId;
object2 = {};
object2.name = (importDefault(7877) /* metro dependency 7877: sanitizeThreadName */)(a0, false);
Reflect.apply(changeThreadSettings, defaultImport, [parentChannelId, object2]);
env0_3.current = a0;
}
}
function _fun113482() { // fn#113482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15209:498, offset: 0x023fc35d, size: 135 bytes, params: 1, frame: 16
var value2;
var defaultImport;
var value3;
var defaultImport2;
let name = threadSettingsDraft.name;
if (name != null) {
if (threadSettingsDraft.parentChannelId != null) {
value2 = environment.__proto__;
defaultImport = importDefault(7877) /* metro dependency 7877: sanitizeThreadName */;
threadSettingsDraftBinding = threadSettingsDraft;
name = threadSettingsDraftBinding.name;
value3 = defaultImport(name, true);
name = threadSettingsDraftBinding.name;
if (value3 !== name) {
defaultImport2 = importDefault(7165) /* metro dependency 7165: DraftActionCreators */;
defaultImport2.changeThreadSettings(threadSettingsDraft.parentChannelId, {name: value3});
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const r13 = optional ? Reflect.apply(string, intl, [t.JPvIiL]) : Reflect.apply(string, intl, [t.j3XWjD]);
const TextInput = (TextInputNativeModule).TextInput;
const textInputProps = {defaultValue: (importDefault(6619) /* metro dependency 6619: useRefValue */)(value4),
errorMessage: value3, label: r13, accessibilityLabel: r13,
accessibilityHint: optional ? undefined : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/+VEZN']),
required: !optional, isClearable: true, autoFocus: true, maxLength: MAX_CHANNEL_NAME_LENGTH,
onSubmitEditing: value7, onBlur: value6, onChange: value5};
r5 = value8 === r5 ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['Nb2/RE']) : r5;
textInputProps.placeholder = r5;
textInputProps.ref = a1;
textInputProps.returnKeyType = 'next';
textInputProps.textContentType = 'none';
return <TextInput {...textInputProps} />;
function _fun113481(a0) { // fn#113481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15209:346, offset: 0x023fc2f0, size: 109 bytes, params: 2, frame: 19
var value2;
var defaultImport;
var changeThreadSettings;
var object;
let parentChannelId = threadSettingsDraft.parentChannelId;
if (parentChannelId != null) {
value2 = environment.__proto__;
defaultImport = importDefault(7165) /* metro dependency 7165: DraftActionCreators */;
changeThreadSettings = defaultImport.changeThreadSettings;
parentChannelId = threadSettingsDraft.parentChannelId;
object = {};
object.name = (importDefault(7877) /* metro dependency 7877: sanitizeThreadName */)(a0, false);
Reflect.apply(changeThreadSettings, defaultImport, [parentChannelId, object]);
env0_3.current = a0;
}
}
function _fun113482() { // fn#113482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15209:498, offset: 0x023fc35d, size: 135 bytes, params: 1, frame: 16
var value2;
var defaultImport;
var value3;
var defaultImport2;
let name = threadSettingsDraft.name;
if (name != null) {
if (threadSettingsDraft.parentChannelId != null) {
value2 = environment.__proto__;
defaultImport = importDefault(7877) /* metro dependency 7877: sanitizeThreadName */;
threadSettingsDraftBinding = threadSettingsDraft;
name = threadSettingsDraftBinding.name;
value3 = defaultImport(name, true);
name = threadSettingsDraftBinding.name;
if (value3 !== name) {
defaultImport2 = importDefault(7165) /* metro dependency 7165: DraftActionCreators */;
defaultImport2.changeThreadSettings(threadSettingsDraft.parentChannelId, {name: value3});
}
}
}
}
function _fun113484() { // fn#113484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15209:726, offset: 0x023fc404, size: 104 bytes, params: 1, frame: 13
var r2;
var value4;
let current = env0_3.current;
let r1 = current !== threadSettingsDraft.name && threadSettingsDraft.name != null;
if (r1) {
value4 = require == null;
if (value4) {
r1 = value4;
r2 = undefined;
} else {
current = require.current;
r1 = current == null;
r2 = current;
}
if (!r1) {
r2.setText(threadSettingsDraft.name);
}
}
}
}
}
function _fun113484() { // fn#113484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15209:726, offset: 0x023fc404, size: 104 bytes, params: 1, frame: 13
var r2;
var value4;
let current = env0_3.current;
let r1 = current !== threadSettingsDraft.name && threadSettingsDraft.name != null;
if (r1) {
value4 = require == null;
if (value4) {
r1 = value4;
r2 = undefined;
} else {
current = require.current;
r1 = current == null;
r2 = current;
}
if (!r1) {
r2.setText(threadSettingsDraft.name);
}
}
}
global.__d(_fun113479, 15012, [31, 1379, 661, 33, 15013, 7165, 7877, 566, 7876, 1244, 7981, 6619,
2]) /* metro module 15012, dependencies: [31, 1379, 661, 33, 15013, 7165, 7877, 566, 7876, 1244, 7981, 6619, 2] */;