532 lines
39 KiB
TypeScript
532 lines
39 KiB
TypeScript
/* Metro module 10338; source: modules/user_profile/native/UserProfileContent.tsx; dependencies: [57, 31, 27, 10035, 1867, 3793, 1878, 7624, 5189, 8516, 6816, 661, 6276, 1376, 33, 8496, 566, 4080, 8692, 1962, 8524, 8513, 8514, 6771, 8783, 3995, 8341, 10339, 1244, 8796, 10340, 4052, 8501, 4617, 6797, 3856, 8695, 7622, 8867, 4578, 9646, 697, 8088, 8752, 8760, 1585, 10341, 10342, 10343, 6902, 8693, 8403, 8494, 8497, 1357, 10034, 8354, 10344, 10345, 10346, 10347, 10348, 10352, 10210, 7331, 10360, 8762, 6792, 10288, 10361, 10327, 10373, 8853, 8761, 10474, 10475, 4017, 8510, 10484, 10485, 10489, 10490, 6517, 8859, 8861, 10494, 2] */
|
|
function _fun80120(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:6, offset: 0x01e6d2d6, size: 495 bytes, params: 8, frame: 20
|
|
const env0_0 = require;
|
|
const closure = PrimaryInfo;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
|
let value = importAll(31) /* metro dependency 31 */;
|
|
const value2 = require(27) /* metro dependency 27 */;
|
|
const env0_5 = value2.ScrollView;
|
|
const env0_6 = value2.View;
|
|
const wishlistStore = importDefault(10035) /* metro dependency 10035: WishlistStore */;
|
|
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
|
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
|
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
|
const userProfileSettingsStore = importDefault(7624) /* metro dependency 7624: UserProfileSettingsStore */;
|
|
const userProfileStore = importDefault(5189) /* metro dependency 5189: UserProfileStore */;
|
|
const env0_13 = (require(8516) /* metro dependency 8516: Constants */).UserProfileSections;
|
|
const constantsModule = require(6816) /* metro dependency 6816: Constants */;
|
|
const env0_14 = constantsModule.PROFILE_CONTENT_BOTTOM_PADDING;
|
|
const env0_15 = constantsModule.PROFILE_CONTENT_WITHOUT_STATUS_TOP_PADDING;
|
|
const env0_16 = (require(661) /* metro dependency 661: Constants */).RelationshipTypes;
|
|
const env0_17 = (require(6276) /* metro dependency 6276: ActionSheetConstants */).ACTION_SHEET_MAX_WIDTH;
|
|
const env0_18 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
|
|
const value4 = require(33) /* metro dependency 33 */;
|
|
const env0_19 = value4.jsx;
|
|
const env0_20 = value4.jsxs;
|
|
const env0_21 = value4.Fragment;
|
|
value = value.memo(UserProfileContent);
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileContent.tsx');
|
|
exports.default = value;
|
|
exports.PrimaryInfo = closure;
|
|
}
|
|
|
|
function CustomStatusBubble({customStatusActivity, user, guildId, channelId, hasCustomProfileTheme, isPreviewingChanges, bubbleRef}) { // fn#80121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:473, offset: 0x01e6d4c5, size: 391 bytes, params: 2, frame: 26
|
|
const value3 = (importDefault(8496) /* metro dependency 8496: UserProfileSharedStyles */)();
|
|
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun80122, [user]);
|
|
const value5 = env0_4.useCallback(_fun80123, [channelId, guildId, user]);
|
|
const value8 = env0_4.useRef(customStatusActivity == null && value4 ? isPreviewingChanges ? null : (importDefault(8524) /* metro dependency 8524: getRandomCustomStatusPrompt */)() : null);
|
|
return ((Component) => <Component ref={bubbleRef} customStatusActivity={customStatusActivity} hasCustomProfileTheme={hasCustomProfileTheme} editEnabled={value4 && !isPreviewingChanges} onPressTruncatedStatus={isPreviewingChanges ? undefined : value5} style={[value3.customStatusBubble,
|
|
value3.customStatusBubbleInset]} emojiOnlyStyle={value3.emojiOnlyCustomStatusBubble} placeholderText={value8.current?.label()} prompt={value8.current} />)(importDefault(8513) /* metro dependency 8513: UserProfileCustomStatusBubble */);
|
|
}
|
|
|
|
function RemoveFriendIconButton({user}) { // fn#80124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:1239, offset: 0x01e6d6f2, size: 279 bytes, params: 2, frame: 19
|
|
const userProfileAnalyticsContextModule = require(8514) /* metro dependency 8514: UserProfileAnalyticsContext */;
|
|
const useUserProfileAnalyticsContext = userProfileAnalyticsContextModule.useUserProfileAnalyticsContext;
|
|
const env0_1 = Reflect.apply(useUserProfileAnalyticsContext, userProfileAnalyticsContextModule,
|
|
[]).trackUserProfileAction;
|
|
const env0_2 = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().newestAnalyticsLocation;
|
|
const RemoveFriendIconButtonHandleConfirm = function() {
|
|
trackUserProfileAction({action: 'REMOVE_FRIEND'});
|
|
importDefault(dependencyMap[24]).removeFriend(user.id, {location: newestAnalyticsLocation});
|
|
};
|
|
const env0_4 = (importDefault(3995) /* metro dependency 3995: UserUtils */).useName(user);
|
|
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
|
|
const object2 = {'size': 'sm', 'variant': 'secondary-overlay'};
|
|
const UserCheckIcon = (require(10339) /* metro dependency 10339: UserCheckIcon */).UserCheckIcon;
|
|
object2.icon = <UserCheckIcon size="sm" color="white" />;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
object2.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cvSt1J);
|
|
object2.onPress = onPress_80126;
|
|
return <IconButton {...object2} />;
|
|
}
|
|
|
|
function RemoveGameFriendIconButton({user, guildId, channelId}) { // fn#80127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:1774, offset: 0x01e6d898, size: 228 bytes, params: 2, frame: 19
|
|
var object2;
|
|
const value2 = env0_4.useCallback(_fun80128, [channelId, guildId, user]);
|
|
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
|
|
object2 = {'size': 'sm', 'variant': 'secondary-overlay'};
|
|
const UserPlatformIcon = (require(4052) /* metro dependency 4052: UserPlatformIcon */).UserPlatformIcon;
|
|
object2.icon = <UserPlatformIcon size="sm" color="white" />;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
object2.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cvSt1J);
|
|
object2.onPress = value2;
|
|
return <IconButton {...object2} />;
|
|
}
|
|
|
|
function PrimaryInfo({user, channelId, displayProfile, displayNameOverride, pronounsOverride, badgesOverride, pendingDisplayNameStyles, style, badgeContainerBackground, isPreviewingChanges}) { // fn#80129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:2195, offset: 0x01e6d9f0, size: 492 bytes, params: 2, frame: 30
|
|
const value3 = (importDefault(3995) /* metro dependency 3995: UserUtils */).useUserTag(user);
|
|
const value4 = (importDefault(8501) /* metro dependency 8501: useBadges */)(displayProfile);
|
|
const value5 = (importDefault(4617) /* metro dependency 4617: NicknameUtils */).useName(displayProfile?.guildId,
|
|
channelId, user);
|
|
const r15 = displayNameOverride == null ? value5 : displayNameOverride.trim().length > 0 ? displayNameOverride : value5;
|
|
const userProfileAnalyticsContextModule = require(8514) /* metro dependency 8514: UserProfileAnalyticsContext */;
|
|
const useUserProfileAnalyticsContext = userProfileAnalyticsContextModule.useUserProfileAnalyticsContext;
|
|
const value6 = env0_4.useCallback(_fun80130, [Reflect.apply(useUserProfileAnalyticsContext,
|
|
userProfileAnalyticsContextModule, []).trackUserProfileAction, value3]);
|
|
const UserProfilePrimaryInfo = importDefault(8695) /* metro dependency 8695: UserProfilePrimaryInfo */;
|
|
const defaultImport3Props = {user: user, guildId: displayProfile?.guildId, displayName: r15,
|
|
pronouns: pronounsOverride ?? displayProfile?.pronouns, badges: badgesOverride ?? value4, style: style,
|
|
badgeContainerBackground: badgeContainerBackground,
|
|
onPressDisplayName: isPreviewingChanges ? undefined : value6};
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
defaultImport3Props.displayNameAccessibilityHint = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y5MwJy);
|
|
defaultImport3Props.onPressUserTag = isPreviewingChanges ? undefined : value6;
|
|
defaultImport3Props.onPressPronouns = isPreviewingChanges ? undefined : _fun80131;
|
|
defaultImport3Props.showBadgeToastOnPress = !isPreviewingChanges;
|
|
defaultImport3Props.pendingDisplayNameStyles = pendingDisplayNameStyles;
|
|
return <UserProfilePrimaryInfo {...defaultImport3Props} />;
|
|
}
|
|
|
|
function EditSection({guildId}) { // fn#80132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:3140, offset: 0x01e6dc71, size: 650 bytes, params: 2, frame: 31
|
|
var object2;
|
|
const PencilIcon = (require(9646) /* metro dependency 9646: PencilIcon */).PencilIcon;
|
|
var r4;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const value3 = (importDefault(8496) /* metro dependency 8496: UserProfileSharedStyles */)();
|
|
const userProfileAnalyticsContextModule = require(8514) /* metro dependency 8514: UserProfileAnalyticsContext */;
|
|
const useUserProfileAnalyticsContext = userProfileAnalyticsContextModule.useUserProfileAnalyticsContext;
|
|
const env0_1 = Reflect.apply(useUserProfileAnalyticsContext, userProfileAnalyticsContextModule,
|
|
[]).trackUserProfileAction;
|
|
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
|
|
return GuildStore.getGuild(guildId);
|
|
});
|
|
const env0_2 = (importDefault(7622) /* metro dependency 7622: useOpenProfileSettings */)();
|
|
const env0_3 = (importDefault(7622) /* metro dependency 7622: useOpenProfileSettings */)({guild: guild});
|
|
const UserProfileTextButtonGroup = importDefault(8867) /* metro dependency 8867: UserProfileTextButtonGroup */;
|
|
object2 = {style: value3.primaryButtons, maxWidth: ACTION_SHEET_MAX_WIDTH};
|
|
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
|
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
|
object2.primaryButton = <Button variant="primary" icon={<PencilIcon size="sm" color={WHITE} />} text={guild != null ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.HmFaFB) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.s5vZlQ)} onPress={onPress_80134} grow />;
|
|
if (guild != null) {
|
|
r4 = <Button variant="primary" icon={<PencilIcon size="sm" color={(importDefault(697) /* metro dependency 697: native */).colors.WHITE} />} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['PKQB/H'])} onPress={onPress_80135} grow />;
|
|
} else {
|
|
r4 = undefined;
|
|
}
|
|
object2.secondaryButton = r4;
|
|
return <UserProfileTextButtonGroup {...object2} />;
|
|
}
|
|
|
|
function UserProfileContent({user, channel, displayProfile, showUserProfileActionSheet, disableCalls, disableMessage, disableStatus, isPreviewingChanges, location, navigateToPremium, navigateToShop, initialSection, scrollPosition}) { // fn#80136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:4005, offset: 0x01e6dfa3, size: 3742 bytes, params: 2, frame: 82
|
|
var object6;
|
|
var r8;
|
|
var r37;
|
|
var r21;
|
|
var r14;
|
|
var object2;
|
|
var UserProfileContactButtons;
|
|
var LayerScope;
|
|
var items11;
|
|
const env0_3 = showUserProfileActionSheet;
|
|
const env0_4 = isPreviewingChanges;
|
|
const value3 = (importDefault(8496) /* metro dependency 8496: UserProfileSharedStyles */)();
|
|
const value4 = (importDefault(8752) /* metro dependency 8752: useUserProfileBannerHeight */)(ACTION_SHEET_MAX_WIDTH);
|
|
const {bannerAnimatedStyle, bannerImageAnimatedStyle, contentAnimatedStyle, blurAnimatedProps,
|
|
showBlur} = (importDefault(8760) /* metro dependency 8760: useUserProfileOverscrollStyles */)({scrollPosition: scrollPosition,
|
|
bannerHeight: value4});
|
|
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
|
|
const userProfileAnalyticsContextModule = require(8514) /* metro dependency 8514: UserProfileAnalyticsContext */;
|
|
const useUserProfileAnalyticsContext = userProfileAnalyticsContextModule.useUserProfileAnalyticsContext;
|
|
const trackUserProfileAction = Reflect.apply(useUserProfileAnalyticsContext, userProfileAnalyticsContextModule,
|
|
[]).trackUserProfileAction;
|
|
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
|
return UserStore.getCurrentUser();
|
|
});
|
|
var isActive = currentUser?.id === user.id;
|
|
const {relationshipType,
|
|
originApplicationId} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([RelationshipStore],
|
|
function() {
|
|
var object = {};
|
|
var userBinding = user;
|
|
object.relationshipType = RelationshipStore.getRelationshipType(userBinding.id);
|
|
object.originApplicationId = RelationshipStore.getOriginApplicationId(userBinding.id);
|
|
return object;
|
|
});
|
|
const value9 = (require(10341) /* metro dependency 10341: GameRelationshipStoreHooks */).useIncomingGameRelationshipsForUser(user.id);
|
|
const value10 = (require(10342) /* metro dependency 10342: useIsGameFriends */).useIsGameFriends(user.id);
|
|
const value11 = (require(10343) /* metro dependency 10343: useUserProfileGameFriendApplicationIds */).useUserProfileGameFriendApplicationIds({userId: user.id});
|
|
const r41 = displayProfile != null ? displayProfile.guildId ?? undefined : channel?.guild_id;
|
|
const value12 = (importDefault(4617) /* metro dependency 4617: NicknameUtils */).useName(r41, channel?.id, user);
|
|
let binding = env0_4;
|
|
let useMemo = binding.useMemo;
|
|
(require(6902) /* metro dependency 6902: subscribeGuildMembers */).useSubscribeGuildMembers(Reflect.apply(useMemo,
|
|
binding, [_fun80139, [r41, user]]), 'UserProfileContent');
|
|
const value14 = (importDefault(8693) /* metro dependency 8693: useCustomStatusActivityForUser */)(user.id);
|
|
const {pendingBanner, pendingAvatar, pendingAvatarDecoration, pendingGlobalName, pendingPronouns, pendingBio,
|
|
pendingAccentColor, pendingThemeColors, pendingLegacyUsernameDisabled,
|
|
pendingDisplayNameStyles} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([UserProfileSettingsStore],
|
|
function() {
|
|
return UserProfileSettingsStore.getPendingChanges();
|
|
});
|
|
const pendingAvatarSrc = (require(8403) /* metro dependency 8403: RecentAvatarUtils */).getPendingAvatarSrc({userId: user.id,
|
|
image: pendingAvatar});
|
|
const value17 = (importDefault(8501) /* metro dependency 8501: useBadges */)(displayProfile,
|
|
pendingLegacyUsernameDisabled);
|
|
const {theme, primaryColor,
|
|
secondaryColor} = (importDefault(8494) /* metro dependency 8494: useProfileTheme */)({user: user,
|
|
displayProfile: displayProfile, pendingThemeColors: isPreviewingChanges ? pendingThemeColors : undefined});
|
|
const value19 = primaryColor != null;
|
|
const {containerBackground, avatarBackground,
|
|
statusBackground} = (require(8497) /* metro dependency 8497: useUserProfileColors */).useUserProfileColors({theme: theme,
|
|
primaryColor: primaryColor, secondaryColor: secondaryColor});
|
|
const value21 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('UserProfileContent');
|
|
const value22 = env0_4.useRef(null);
|
|
const value23 = env0_4.useRef(null);
|
|
const firstWishlistId = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserProfileStore],
|
|
function() {
|
|
return UserProfileStore.getFirstWishlistId(user.id);
|
|
});
|
|
(require(10034) /* metro dependency 10034: useWishlistHooks */).useFetchWishlist({wishlistId: firstWishlistId,
|
|
userId: user.id});
|
|
const value24 = (require(566) /* metro dependency 566: flux */).useStateFromStores([WishlistStore], _fun80142,
|
|
[firstWishlistId]);
|
|
const value25 = (require(8354) /* metro dependency 8354: SocialLayerStorefrontMobilePurchasingExperiment */).useIsEligibleForSocialLayerStorefrontMobilePurchasing({location: 'user_profile_content'});
|
|
binding = env0_4;
|
|
useMemo = binding.useMemo;
|
|
const r15 = isActive || value24 != null && Reflect.apply(useMemo, binding, [_fun80143, [value24, isActive,
|
|
value25]]).length > 0;
|
|
binding = env0_4;
|
|
let useState = binding.useState;
|
|
const value30 = Reflect.apply(useState, binding, [0]);
|
|
binding = env0_3;
|
|
const value31 = binding(value30, 2);
|
|
const property = value31[0];
|
|
const env0_21 = value31[1];
|
|
const value33 = env0_4.useCallback(_fun80145, []);
|
|
const {pageHeights,
|
|
handlePageContentSize} = (require(10345) /* metro dependency 10345: useSegmentedPagesHeight */).usePageHeights();
|
|
const binding3 = env0_4;
|
|
useState = binding3.useState;
|
|
let WISHLIST = UserProfileSections.WISHLIST;
|
|
const value35 = binding(Reflect.apply(useState, binding3, [initialSection === WISHLIST]), 2);
|
|
const property2 = value35[0];
|
|
const env0_24 = value35[1];
|
|
const {isVisible,
|
|
markAsDismissed} = (require(10346) /* metro dependency 10346: useWishlistViewerCoachmark */).useWishlistViewerCoachmark({isCurrentUser: isActive,
|
|
shouldShowWishlistTab: r15});
|
|
const value37 = env0_4.useCallback(_fun80146, [trackUserProfileAction, isVisible, markAsDismissed]);
|
|
const value40 = env0_4.useCallback(_fun80149, [user, currentUser, containerBackground, value3, isPreviewingChanges,
|
|
value21, env0_4.useCallback(_fun80147, [navigateToPremium]), env0_4.useCallback(_fun80148, [navigateToShop]),
|
|
value19, r41, value11, displayProfile, value12, pendingBio, channel, showUserProfileActionSheet]);
|
|
const value42 = env0_4.useMemo(_fun80151, [handlePageContentSize, value40, env0_4.useCallback(_fun80150,
|
|
[value3.profileContent, firstWishlistId, property2])]);
|
|
const segmentedControlStateNativeModule = require(8853) /* metro dependency 8853: SegmentedControlStateNative */;
|
|
const useSegmentedControlState = segmentedControlStateNativeModule.useSegmentedControlState;
|
|
object6 = {pageWidth: property};
|
|
WISHLIST = UserProfileSections.WISHLIST;
|
|
object6.defaultIndex = initialSection !== WISHLIST ? 0 : 1;
|
|
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
|
object6.itemSpacing = PX_24;
|
|
object6.items = value42;
|
|
object6.onPageChange = value37;
|
|
const value43 = Reflect.apply(useSegmentedControlState, segmentedControlStateNativeModule, [object6]);
|
|
const value44 = (require(10345) /* metro dependency 10345: useSegmentedPagesHeight */).usePagesHeightStyle(value43,
|
|
pageHeights);
|
|
const value45 = env0_4.useCallback(_fun80154, [value43, markAsDismissed]);
|
|
if (user == null) {
|
|
return null;
|
|
}
|
|
if (currentUser == null) {
|
|
return null;
|
|
}
|
|
object6 = {backgroundColor: containerBackground};
|
|
const jsxRuntimeEnv0_21Binding = jsxRuntimeEnv0_21;
|
|
const UserProfileOverscrollBanner = importDefault(8761) /* metro dependency 8761: UserProfileOverscrollBanner */;
|
|
const object4 = {user: user, displayProfile: displayProfile, bannerHeight: value4};
|
|
let r56 = isPreviewingChanges ? pendingBanner : undefined;
|
|
object4.pendingBanner = r56;
|
|
object4.pendingAvatarSrc = isPreviewingChanges ? pendingAvatarSrc : undefined;
|
|
object4.pendingAccentColor = isPreviewingChanges && pendingAccentColor != null ? pendingAccentColor : undefined;
|
|
object4.pendingThemeColors = isPreviewingChanges && pendingThemeColors != null ? pendingThemeColors : undefined;
|
|
object4.disableInteraction = isPreviewingChanges;
|
|
object4.bannerAnimatedStyle = bannerAnimatedStyle;
|
|
object4.bannerImageAnimatedStyle = bannerImageAnimatedStyle;
|
|
object4.blurAnimatedProps = blurAnimatedProps;
|
|
object4.showBlur = showBlur;
|
|
object4.privateBanner = displayProfile?.private !== true ? undefined : ((Component) => <Component primaryColor={primaryColor} />)(importDefault(10474) /* metro dependency 10474: UserProfilePrivateBanner */);
|
|
if (isPreviewingChanges) {
|
|
r8 = undefined;
|
|
} else {
|
|
object2 = {};
|
|
r56 = displayProfile?.private;
|
|
r56 = r56 && value3.bannerButtonsWithPrivateBanner;
|
|
object2.style = [value3.bannerButtons, r56];
|
|
r56 = user.id === currentUser.id || user.bot ? null : relationshipType === RelationshipTypes.FRIEND ? <RemoveFriendIconButton user={user} /> : value10 ? <RemoveGameFriendIconButton user={user} /> : null;
|
|
r8 = <View {...object2}>{r56}{((Component) => <Component user={user} currentUser={currentUser} displayProfile={displayProfile} channel={channel} />)(importDefault(10475) /* metro dependency 10475: UserProfileOverflowMenu */)}</View>;
|
|
}
|
|
object4.buttons = r8;
|
|
const userProfileOverscrollBanner = <UserProfileOverscrollBanner {...object4} />;
|
|
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
|
const value51 = ((Component) => <Component user={user} guildId={r41} disableStatus={disableStatus} pendingAvatarSrc={isPreviewingChanges ? pendingAvatarSrc : undefined} pendingAvatarDecoration={isPreviewingChanges ? pendingAvatarDecoration : undefined} backgroundColor={avatarBackground} statusStyle={{backgroundColor: statusBackground}} />)(importDefault(8510) /* metro dependency 8510: UserProfileAvatar */);
|
|
const items6 = [value3.profileContentWrapper];
|
|
const PROFILE_CONTENT_WITHOUT_STATUS_TOP_PADDING2 = isActive ? isPreviewingChanges ? value14 != null ? 0 : PROFILE_CONTENT_WITHOUT_STATUS_TOP_PADDING : 0 : value14 != null ? 0 : PROFILE_CONTENT_WITHOUT_STATUS_TOP_PADDING;
|
|
items6[1] = {paddingTop: PROFILE_CONTENT_WITHOUT_STATUS_TOP_PADDING2,
|
|
paddingBottom: bottom + PROFILE_CONTENT_BOTTOM_PADDING};
|
|
const items7 = [<CustomStatusBubble customStatusActivity={value14} user={user} guildId={r41} channelId={channel?.id} hasCustomProfileTheme={value19} showUserProfileActionSheet={showUserProfileActionSheet} isPreviewingChanges={isPreviewingChanges} bubbleRef={value22} />];
|
|
const items8 = [value3.primaryInfo];
|
|
items8[1] = value3.profileContent;
|
|
const items9 = [<PrimaryInfo user={user} channelId={channel?.id} displayProfile={displayProfile} displayNameOverride={isPreviewingChanges ? pendingGlobalName : undefined} pronounsOverride={isPreviewingChanges ? pendingPronouns : undefined} badgesOverride={isPreviewingChanges ? value17 : undefined} pendingDisplayNameStyles={isPreviewingChanges ? pendingDisplayNameStyles : undefined} badgeContainerBackground={containerBackground} isPreviewingChanges={isPreviewingChanges} />];
|
|
items9[1] = user.id !== currentUser.id && ((Component) => <Component user={user} guildId={r41} />)(importDefault(10484) /* metro dependency 10484: UserProfileMutuals */);
|
|
const PENDING_INCOMING = RelationshipTypes.PENDING_INCOMING;
|
|
items9[2] = relationshipType === PENDING_INCOMING && ((Component) => <Component user={user} channelId={channel?.id} guildId={r41} applicationId={originApplicationId} style={object6} showUserProfile={showUserProfileActionSheet} />)(importDefault(10485) /* metro dependency 10485: UserProfileIncomingFriendRequest */);
|
|
items9[3] = value9.map(_fun80155);
|
|
items9[4] = ((Component) => <Component user={user} style={object6} />)(importDefault(10489) /* metro dependency 10489: UserProfileRemediatedNotice */);
|
|
var isActive = user.id === currentUser.id;
|
|
items9[5] = isActive && !isPreviewingChanges && <EditSection guildId={r41} />;
|
|
const value61 = user.id !== currentUser.id;
|
|
if (value61) {
|
|
UserProfileContactButtons = importDefault(10490) /* metro dependency 10490: UserProfileContactButtons */;
|
|
r37 = disableCalls || relationshipType === RelationshipTypes.BLOCKED;
|
|
r37 = !r37 ? user.isProvisional : r37;
|
|
r21 = <UserProfileContactButtons user={user} disableCalls={r37} disableMessage={disableMessage} location={location} hasCustomProfileTheme={value19} style={value3.primaryButtons} />;
|
|
} else {
|
|
r21 = value61;
|
|
}
|
|
items9[6] = r21;
|
|
items7[1] = <View style={items8}>{items9}</View>;
|
|
if (r15) {
|
|
object6 = {onLayout: value33};
|
|
LayerScope = (require(6517) /* metro dependency 6517: LayerScopeNative */).LayerScope;
|
|
items11 = [<View style={value3.profileTablist}>{((Tabs) => <Tabs state={value43} variant={value19 ? 'gradient-background' : undefined} />)((require(8859) /* metro dependency 8859: TabsNative */).Tabs)}<View ref={value23} style={{'position': 'absolute',
|
|
|
|
'left': '50%', 'top': 0, 'right': 0, 'bottom': 0}} collapsable={false} pointerEvents="box-none" /></View>];
|
|
items11[1] = ((View) => <View style={value44}>{((SegmentedControlPages) => <SegmentedControlPages state={value43} />)((require(8861) /* metro dependency 8861: SegmentedControlPagesNative */).SegmentedControlPages)}</View>)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View);
|
|
items11[2] = ((Component) => <Component anchorRef={value23} isVisible={isVisible} markAsDismissed={markAsDismissed} onViewWishlist={value45} />)(importDefault(10494) /* metro dependency 10494: WishlistViewerCoachmark */);
|
|
r14 = <View {...object6}><LayerScope>{items11}</LayerScope></View>;
|
|
} else {
|
|
r14 = value40();
|
|
}
|
|
items7[2] = r14;
|
|
return (
|
|
<>
|
|
{userProfileOverscrollBanner}
|
|
<View2 style={contentAnimatedStyle}>
|
|
{value51}
|
|
<View style={items6}>
|
|
{items7}
|
|
</View>
|
|
</View2>
|
|
</>
|
|
);
|
|
}
|
|
|
|
function _fun80122() { // fn#80122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:666, offset: 0x01e6d64c, size: 50 bytes, params: 1, frame: 10
|
|
const value = environment.__proto__;
|
|
return UserStore.getCurrentUser()?.id === user.id;
|
|
}
|
|
|
|
function _fun80123() { // fn#80123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:757, offset: 0x01e6d67e, size: 116 bytes, params: 1, frame: 18
|
|
let value = environment.__proto__;
|
|
const defaultImport = importDefault(dependencyMap[17]);
|
|
const openLazy = defaultImport.openLazy;
|
|
value = require(dependencyMap[19]);
|
|
value = value(dependencyMap[18], dependencyMap.paths);
|
|
Reflect.apply(openLazy, defaultImport, [value, 'UserProfileCustomStatusActionSheet', {user: user, guildId: guildId,
|
|
channelId: channelId}, 'stack']);
|
|
}
|
|
|
|
function RemoveFriendIconButtonOnPress() { // fn#80126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:1692, owner: RemoveFriendIconButton.onPress, offset: 0x01e6d85b, size: 61 bytes, params: 1, frame: 14
|
|
const value = environment.__proto__;
|
|
(require(8796) /* metro dependency 8796: UserProfileAlertUtils */).confirmRemoveFriend({userDisplayName: env0_4,
|
|
onConfirm: RemoveFriendIconButtonHandleConfirm});
|
|
}
|
|
|
|
function _fun80128() { // fn#80128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:1863, offset: 0x01e6d97c, size: 116 bytes, params: 1, frame: 18
|
|
let value = environment.__proto__;
|
|
const defaultImport = importDefault(dependencyMap[17]);
|
|
const openLazy = defaultImport.openLazy;
|
|
value = require(dependencyMap[19]);
|
|
value = value(dependencyMap[30], dependencyMap.paths);
|
|
Reflect.apply(openLazy, defaultImport, [value, 'UserProfileGameFriendActionSheet', {user: user, guildId: guildId,
|
|
channelId: channelId}, 'stack']);
|
|
}
|
|
|
|
function _fun80130() { // fn#80130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:2606, offset: 0x01e6dbdc, size: 88 bytes, params: 1, frame: 14
|
|
trackUserProfileAction({action: 'COPY_USERNAME'});
|
|
(require(6797) /* metro dependency 6797: ClipboardUtilsNative */).copy(env0_0);
|
|
(require(3856) /* metro dependency 3856: ToastUtils */).presentUsernameCopied();
|
|
}
|
|
|
|
function _fun80131() { // fn#80131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:3020, offset: 0x01e6dc34, size: 61 bytes, params: 1, frame: 12
|
|
trackUserProfileAction({action: 'PRESS_PRONOUNS'});
|
|
const value = environment.__proto__;
|
|
(require(3856) /* metro dependency 3856: ToastUtils */).presentUserPronouns();
|
|
}
|
|
|
|
function EditSectionOnPress() { // fn#80134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:3621, owner: EditSection.onPress, offset: 0x01e6defb, size: 83 bytes, params: 1, frame: 14
|
|
trackUserProfileAction({action: 'EDIT_PROFILE'});
|
|
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
|
(importDefault(8088) /* metro dependency 8088: closeVoicePanels */)();
|
|
env0_2();
|
|
}
|
|
|
|
function EditSectionOnPress_80135() { // fn#80135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:3891, owner: EditSection.onPress, offset: 0x01e6df4e, size: 85 bytes, params: 1, frame: 14
|
|
trackUserProfileAction({action: 'EDIT_GUILD_PROFILE'});
|
|
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
|
(importDefault(8088) /* metro dependency 8088: closeVoicePanels */)();
|
|
env0_3();
|
|
}
|
|
|
|
function _fun80139() { // fn#80139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:5094, offset: 0x01e6ee7f, size: 58 bytes, params: 1, frame: 5
|
|
return env0_12 == null ? {} : user != null ? {[env0_12]: [user.id]} : {};
|
|
}
|
|
|
|
function _fun80142() { // fn#80142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:6136, offset: 0x01e6eeec, size: 40 bytes, params: 1, frame: 12
|
|
const firstWishlistIdBinding = firstWishlistId;
|
|
const value2 = null;
|
|
return value2 != firstWishlistIdBinding ? WishlistStore.getWishlist(firstWishlistId) : value2;
|
|
}
|
|
|
|
function _fun80143() { // fn#80143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:6294, offset: 0x01e6ef14, size: 57 bytes, params: 1, frame: 13
|
|
let r0 = env0_19 == null ? undefined : env0_19.items.filter(_fun80144);
|
|
r0 = r0 ?? [];
|
|
return r0;
|
|
}
|
|
|
|
function _fun80145({nativeEvent}) { // fn#80145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:6583, offset: 0x01e6ef8e, size: 36 bytes, params: 2, frame: 11
|
|
env0_21(nativeEvent.layout.width);
|
|
}
|
|
|
|
function _fun80146(a0) { // fn#80146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:6905, offset: 0x01e6efb2, size: 105 bytes, params: 2, frame: 17
|
|
const value2 = a0 === 1;
|
|
env0_24(value2);
|
|
trackUserProfileAction({action: 'PRESS_SECTION',
|
|
section: value2 ? UserProfileSections.WISHLIST : UserProfileSections.MAIN});
|
|
if (value2 && isVisible) {
|
|
markAsDismissed(ContentDismissActionType.INDIRECT_ACTION);
|
|
}
|
|
}
|
|
|
|
function _fun80147() { // fn#80147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:7043, offset: 0x01e6f01b, size: 58 bytes, params: 1, frame: 12
|
|
const value = environment.__proto__;
|
|
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
|
if (navigateToPremium != null) {
|
|
navigateToPremium();
|
|
}
|
|
}
|
|
|
|
function _fun80148() { // fn#80148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:7113, offset: 0x01e6f055, size: 58 bytes, params: 1, frame: 12
|
|
const value = environment.__proto__;
|
|
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
|
if (navigateToShop != null) {
|
|
navigateToShop();
|
|
}
|
|
}
|
|
|
|
function _fun80149() { // fn#80149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:7183, offset: 0x01e6f08f, size: 1192 bytes, params: 1, frame: 24
|
|
var r6;
|
|
var UserProfileModeratorActions;
|
|
if (user == null) {
|
|
return null;
|
|
}
|
|
if (currentUser == null) {
|
|
return null;
|
|
}
|
|
const binding = env0_7;
|
|
const items4 = [binding.card];
|
|
items4[1] = {backgroundColor: containerBackground};
|
|
const items2 = [binding.cards];
|
|
items2[1] = binding.profileContent;
|
|
const displayProfileBinding = displayProfile;
|
|
const value3 = undefined;
|
|
const items3 = [(displayProfileBinding == null ? value3 : displayProfile.private) && ((Component) => <Component username={env0_13} containerBackground={containerBackground} />)(importDefault(10347) /* metro dependency 10347: UserProfilePrivateInfoBanner */)];
|
|
items3[1] = user.isProvisional && ((UserProfileProvisionalAccountExplainerCard) => <UserProfileProvisionalAccountExplainerCard style={items4} userId={user.id} iconSize={16} />)((require(10348) /* metro dependency 10348: ProvisionalAccountExplainer */).UserProfileProvisionalAccountExplainerCard);
|
|
items3[2] = user.id === currentUser.id && !isPreviewingChanges && ((Component) => <Component navigateToPremium={env0_27} navigateToShop={env0_28} hasCustomProfileTheme={env0_15} />)(importDefault(10352) /* metro dependency 10352: UserProfileDismissibleUpsells */);
|
|
items3[3] = ((Component) => <Component user={user} currentUser={currentUser} guildId={env0_12} style={items4} />)(importDefault(10210) /* metro dependency 10210: UserProfileActivity */);
|
|
items3[4] = env0_17 && ((Component) => <Component />)(importDefault(7331) /* metro dependency 7331: FormDivider */);
|
|
items3[5] = env0_11.length > 0 && ((Component) => <Component userId={user.id} applicationIds={env0_11} style={env0_17 ? value3 : items4} />)(importDefault(10360) /* metro dependency 10360: UserProfileGameFriendsCard */);
|
|
items3[6] = ((Component) => <Component userId={user.id} displayProfile={displayProfile} pendingBio={isPreviewingChanges ? pendingBio : value3} style={env0_17 ? value3 : items4} />)(importDefault(8762) /* metro dependency 8762: UserProfileAboutMeCard */);
|
|
items3[7] = env0_17 && ((Component) => <Component />)(importDefault(7331) /* metro dependency 7331: FormDivider */);
|
|
items3[8] = env0_12 != null && ((Component) => <Component userId={user.id} guildId={env0_12} style={env0_17 ? value3 : items4} />)(importDefault(6792) /* metro dependency 6792: UserProfileRolesCard */);
|
|
const value15 = (channel == null ? value3 : channel.guild_id) != null;
|
|
if (value15) {
|
|
UserProfileModeratorActions = importDefault(10288) /* metro dependency 10288: UserProfileModeratorActions */;
|
|
userBinding = user;
|
|
currentUserBinding = currentUser;
|
|
channelBinding = channel;
|
|
r6 = <UserProfileModeratorActions user={userBinding} currentUser={currentUserBinding} guildId={channelBinding.guild_id} channelId={channelBinding.id} showUserProfile={showUserProfileActionSheet} style={env0_17 ? value3 : items4} />;
|
|
} else {
|
|
r6 = value15;
|
|
}
|
|
items3[9] = r6;
|
|
items3[10] = env0_17 && ((Component) => <Component />)(importDefault(7331) /* metro dependency 7331: FormDivider */);
|
|
const UserProfileAccountConnectionsCard = (require(10361) /* metro dependency 10361: UserProfileConnections */).UserProfileAccountConnectionsCard;
|
|
items3[11] = <UserProfileAccountConnectionsCard userId={user.id} style={env0_17 ? value3 : items4} />;
|
|
const UserProfileApplicationRoleConnectionsCard = (require(10361) /* metro dependency 10361: UserProfileConnections */).UserProfileApplicationRoleConnectionsCard;
|
|
items3[12] = <UserProfileApplicationRoleConnectionsCard userId={user.id} style={env0_17 ? value3 : items4} />;
|
|
items3[13] = !isPreviewingChanges && ((Component) => <Component userId={user.id} style={env0_17 ? value3 : items4} onBack={showUserProfileActionSheet} />)(importDefault(10327) /* metro dependency 10327: UserProfileNote */);
|
|
return (
|
|
<View style={items2}>
|
|
{items3}
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function _fun80150() { // fn#80150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:8352, offset: 0x01e6f537, size: 157 bytes, params: 1, frame: 19
|
|
const value = environment.__proto__;
|
|
return (
|
|
<View style={env0_7.profileContent}>
|
|
{firstWishlistId == null ? ((WishlistEmptyState) => <WishlistEmptyState />)((require(10373) /* metro dependency 10373: UserProfileWishlistGrid */).WishlistEmptyState) : ((Component) => <Component wishlistId={firstWishlistId} maxWidth={ACTION_SHEET_MAX_WIDTH} isVisible={env0_23} />)(importDefault(10373) /* metro dependency 10373: UserProfileWishlistGrid */)}
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function _fun80151() { // fn#80151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:8531, offset: 0x01e6f5d4, size: 249 bytes, params: 1, frame: 22
|
|
let object2 = {id: 'main'};
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const string = intl.string;
|
|
const LXw470 = (require(1244) /* metro dependency 1244: indexNative */).t.LXw470;
|
|
object2.label = Reflect.apply(string, intl, [LXw470]);
|
|
object2.page = <ScrollView scrollEnabled={false} onContentSizeChange={function(a0, a1) {
|
|
return handlePageContentSize(0, a0, a1);
|
|
}}>{env0_29()}</ScrollView>;
|
|
const items2 = [object2];
|
|
object2 = {id: 'wishlist'};
|
|
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7lZ31J']);
|
|
object2.page = <ScrollView scrollEnabled={false} onContentSizeChange={function(a0, a1) {
|
|
return handlePageContentSize(1, a0, a1);
|
|
}}>{env0_30()}</ScrollView>;
|
|
items2[1] = object2;
|
|
return items2;
|
|
}
|
|
|
|
function _fun80154() { // fn#80154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:9033, offset: 0x01e6f702, size: 47 bytes, params: 1, frame: 12
|
|
env0_31.setActiveIndex(1);
|
|
const markAsDismissedBinding = markAsDismissed;
|
|
const TAKE_ACTION = ContentDismissActionType.TAKE_ACTION;
|
|
markAsDismissedBinding(TAKE_ACTION);
|
|
}
|
|
|
|
function _fun80155(a0) { // fn#80155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:10810, offset: 0x01e6f731, size: 128 bytes, params: 2, frame: 18
|
|
const value = environment.__proto__;
|
|
return ((Component) => <Component user={user} isGameRelationship applicationId={a0.applicationId} channelId={channel?.id} guildId={env0_12} style={env0_32} showUserProfile={showUserProfileActionSheet} key={a0.applicationId} />)(importDefault(10485) /* metro dependency 10485: UserProfileIncomingFriendRequest */);
|
|
}
|
|
|
|
function _fun80144(a0) { // fn#80144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10524:6354, offset: 0x01e6ef4d, size: 65 bytes, params: 2, frame: 14
|
|
const value = environment.__proto__.__proto__;
|
|
return (require(10344) /* metro dependency 10344: WishlistUtils */).isEligibleWishlistItemOnMobile(a0,
|
|
{isWishlistOwner: env1_10, isSocialLayerStorefrontMobilePurchasingEnabled: env1_20});
|
|
}
|
|
|