Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,248 @@
|
||||
/* 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] */
|
||||
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 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;
|
||||
object = {};
|
||||
object.row = {flexDirection: 'row'};
|
||||
object.subtextContent = {'lineHeight': 18, 'flexShrink': 1};
|
||||
object.timestamp = {lineHeight: 18};
|
||||
const object2 = {'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;
|
||||
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');
|
||||
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"
|
||||
>
|
||||
{Reflect.apply(format, intl, [M79KAH, {usernameHook: usernameHook_114226,
|
||||
messageTextHook: messageTextHook}])}
|
||||
</Text>
|
||||
</SubstringRow>
|
||||
);
|
||||
}
|
||||
|
||||
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 = (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}
|
||||
accessibilityLabel={accessibilityLabel}
|
||||
variant="text-sm/medium"
|
||||
color="text-default"
|
||||
>
|
||||
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.imPXd5,
|
||||
{usernameHook: usernameHook})}
|
||||
</Text>
|
||||
</SubstringRow>
|
||||
);
|
||||
}
|
||||
|
||||
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} />;
|
||||
}
|
||||
|
||||
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}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user