469 lines
30 KiB
TypeScript
469 lines
30 KiB
TypeScript
/* Metro module 14916; source: modules/user_profile/native/YouScreenUserProfileContent.tsx; dependencies: [57, 31, 27, 6876, 5189, 8516, 6816, 1376, 33, 14911, 14746, 477, 8510, 8496, 8514, 7013, 1365, 8867, 4578, 9646, 697, 1244, 14917, 1485, 8490, 6882, 8501, 566, 1357, 8494, 8497, 4127, 14918, 10345, 5176, 8524, 14919, 10352, 14239, 10210, 8762, 7331, 10361, 14921, 10327, 10373, 8853, 4017, 6517, 8513, 8695, 9122, 8859, 8861, 2] */
|
|
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
|
|
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
|
|
import MobileVisualRefreshExperiment from '../../themes/experiments/MobileVisualRefreshExperiment.tsx'; /* Metro dependency 1357 */
|
|
import ReanimatedRexport from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
|
|
import UserProfileStore from '../UserProfileStore.tsx'; /* Metro dependency 5189 */
|
|
import SelfPresenceStore from '../../../stores/SelfPresenceStore.tsx'; /* Metro dependency 6876 */
|
|
import UseDisplayProfile from '../hooks/useDisplayProfile.tsx'; /* Metro dependency 8490 */
|
|
import UseProfileTheme from '../hooks/useProfileTheme.tsx'; /* Metro dependency 8494 */
|
|
import UserProfileSharedStyles from './UserProfileSharedStyles.tsx'; /* Metro dependency 8496 */
|
|
import UseBadges from '../hooks/useBadges.tsx'; /* Metro dependency 8501 */
|
|
import UserProfilePrimaryInfo from './UserProfilePrimaryInfo.tsx'; /* Metro dependency 8695 */
|
|
import UserProfileTextButtonGroup from './UserProfileTextButtonGroup.tsx'; /* Metro dependency 8867 */
|
|
import UserProfileActivity from './UserProfileActivity.tsx'; /* Metro dependency 10210 */
|
|
import DisplayNameStylesCoachmark from '../../display_name_styles/native/DisplayNameStylesCoachmark.tsx'; /* Metro dependency 14917 */
|
|
import YouExpiringTrialOfferCard from '../../main_tabs_v2/native/tabs/you/YouExpiringTrialOfferCard.tsx'; /* Metro dependency 14919 */
|
|
import UserProfileYourFriendsCard from './UserProfileYourFriendsCard.tsx'; /* Metro dependency 14921 */
|
|
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 PlatformUtilsModule from '../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
|
|
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as Dismissible_contentModule from '../../../external/discord_common/js/packages/protos/discord_protos/discord_users/v1/dismissible_content.tsx'; /* Metro dependency 1365 */
|
|
import * as DismissibleContentConstantsModule from '../../dismissible_content/DismissibleContentConstants.tsx'; /* Metro dependency 1376 */
|
|
import * as moduleValue11 from '../../../by-id/module-01485.js'; /* Metro dependency 1485 */
|
|
import * as UseVirtualCurrencyMobileEnabledModule from '../../virtual_currency/hooks/native/useVirtualCurrencyMobileEnabled.tsx'; /* Metro dependency 4127 */
|
|
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
|
|
import * as YouBarExperimentModule from '../../main_tabs_v2/YouBarExperiment.tsx'; /* Metro dependency 5176 */
|
|
import * as LayerScopeNativeModule from '../../../design/components/Layers/native/LayerScope.native.tsx'; /* Metro dependency 6517 */
|
|
import * as ConstantsModule from './Constants.tsx'; /* Metro dependency 6816 */
|
|
import * as UserSettingToActivityModule from '../../custom_status/utils/userSettingToActivity.tsx'; /* Metro dependency 6882 */
|
|
import * as UseSelectedDismissibleContentModule from '../../dismissible_content/hooks/useSelectedDismissibleContent.tsx'; /* Metro dependency 7013 */
|
|
import * as UseUserProfileColorsModule from '../hooks/native/useUserProfileColors.tsx'; /* Metro dependency 8497 */
|
|
import * as UserProfileAnalyticsContextModule from '../UserProfileAnalyticsContext.tsx'; /* Metro dependency 8514 */
|
|
import * as ConstantsModule2 from '../Constants.tsx'; /* Metro dependency 8516 */
|
|
import * as SegmentedControlStateNativeModule from '../../../design/components/SegmentedControl/native/SegmentedControlState.native.tsx'; /* Metro dependency 8853 */
|
|
import * as TabsNativeModule from '../../../design/components/Tabs/native/Tabs.native.tsx'; /* Metro dependency 8859 */
|
|
import * as SegmentedControlPagesNativeModule from '../../../design/components/SegmentedControl/native/SegmentedControlPages.native.tsx'; /* Metro dependency 8861 */
|
|
import * as PencilIconModule from '../../../design/components/Icon/native/redesign/generated/PencilIcon.tsx'; /* Metro dependency 9646 */
|
|
import * as UseSegmentedPagesHeightModule from './useSegmentedPagesHeight.tsx'; /* Metro dependency 10345 */
|
|
import * as UserProfileConnectionsModule from './UserProfileConnections.tsx'; /* Metro dependency 10361 */
|
|
import * as ShowYouAccountActionSheetModule from '../../main_tabs_v2/native/tabs/you/utils/showYouAccountActionSheet.tsx'; /* Metro dependency 14746 */
|
|
import * as TrackingModule from '../../main_tabs_v2/native/tabs/you/tracking/Tracking.tsx'; /* Metro dependency 14911 */
|
|
import * as UseShouldShowExpiringTrialOfferCardModule from '../../main_tabs_v2/native/tabs/you/hooks/useShouldShowExpiringTrialOfferCard.tsx'; /* Metro dependency 14918 */
|
|
|
|
function _fun112836(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15113:6, offset: 0x023ddcd5, size: 328 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ReactNativeModule;
|
|
const env0_5 = value.ScrollView;
|
|
const env0_6 = value.View;
|
|
value = require(33) /* metro dependency 33 */;
|
|
const env0_12 = value.jsx;
|
|
const env0_13 = value.Fragment;
|
|
const env0_14 = value.jsxs;
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/user_profile/native/YouScreenUserProfileContent.tsx');
|
|
exports.default = YouScreenUserProfileContent;
|
|
function YouAvatar_112837(a0) { // fn#112837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15113:307, offset: 0x023dde1d, size: 153 bytes, params: 2, frame: 16
|
|
const value2 = ReactModule.useCallback(_fun112838, []);
|
|
const value3 = undefined;
|
|
const isAndroid2 = (PlatformUtilsModule).isAndroid();
|
|
return ((Component) => <Component {...a0} {...{['onPress']: value2}} {...{['importantForAccessibility']: 'no-hide-descendants'}} {...{['accessibilityElementsHidden']: isAndroid2}} {...{['accessible']: !isAndroid2 && value3}} />)(importDefault(8510) /* metro dependency 8510: UserProfileAvatar */);
|
|
function _fun112838() { // fn#112838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15113:350, offset: 0x023ddeb6, size: 59 bytes, params: 1, frame: 13
|
|
const value = environment.__proto__;
|
|
(TrackingModule).trackYouTabAvatarPress();
|
|
(ShowYouAccountActionSheetModule).showYouAccountActionSheet();
|
|
}
|
|
|
|
}
|
|
|
|
function EditSection_112839({navigateToProfileCustomization}) { // fn#112839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15113:590, offset: 0x023ddef1, size: 538 bytes, params: 2, frame: 31
|
|
const value2 = (UserProfileSharedStyles)();
|
|
const useUserProfileAnalyticsContext = UserProfileAnalyticsContextModule.useUserProfileAnalyticsContext;
|
|
const trackUserProfileAction = Reflect.apply(useUserProfileAnalyticsContext, UserProfileAnalyticsContextModule,
|
|
[]).trackUserProfileAction;
|
|
const value3 = ReactModule.useRef(null);
|
|
const useSelectedDismissibleContent = UseSelectedDismissibleContentModule.useSelectedDismissibleContent;
|
|
const DismissibleContent = (Dismissible_contentModule).DismissibleContent;
|
|
let DISPLAY_NAME_STYLES_MOBILE_PROFILE_TOOLTIP = DismissibleContent.DISPLAY_NAME_STYLES_MOBILE_PROFILE_TOOLTIP;
|
|
const value5 = Module00057(Reflect.apply(useSelectedDismissibleContent, UseSelectedDismissibleContentModule,
|
|
[[DISPLAY_NAME_STYLES_MOBILE_PROFILE_TOOLTIP]]), 2);
|
|
const property = value5[0];
|
|
const property2 = value5[1];
|
|
DISPLAY_NAME_STYLES_MOBILE_PROFILE_TOOLTIP = DismissibleContent.DISPLAY_NAME_STYLES_MOBILE_PROFILE_TOOLTIP;
|
|
const value6 = property === DISPLAY_NAME_STYLES_MOBILE_PROFILE_TOOLTIP;
|
|
const value7 = ReactModule.useCallback(_fun112840, [navigateToProfileCustomization, trackUserProfileAction, value6,
|
|
property2]);
|
|
const jsxRuntimeEnv0_13Binding = jsxRuntimeEnv0_13;
|
|
const primaryButtons = value2.primaryButtons;
|
|
const Button = (ButtonNativeModule).Button;
|
|
const object2 = {ref: value3, variant: 'primary'};
|
|
const PencilIcon = (PencilIconModule).PencilIcon;
|
|
const WHITE = (Native).colors.WHITE;
|
|
object2.icon = <PencilIcon size="sm" color={WHITE} />;
|
|
const intl = (IndexNativeModule).intl;
|
|
const string = intl.string;
|
|
const AAjhgi = (IndexNativeModule).t.AAjhgi;
|
|
object2.text = Reflect.apply(string, intl, [AAjhgi]);
|
|
object2.onPress = value7;
|
|
object2.grow = true;
|
|
return (
|
|
<>
|
|
<UserProfileTextButtonGroup style={primaryButtons} secondaryButton={<Button {...object2} />} />
|
|
{((Component) => <Component targetRef={value3} visible={value6} markAsDismissed={property2} />)(DisplayNameStylesCoachmark)}
|
|
</>
|
|
);
|
|
function _fun112840() { // fn#112840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15113:980, offset: 0x023de10b, size: 93 bytes, params: 1, frame: 14
|
|
trackUserProfileAction({action: 'EDIT_PROFILE'});
|
|
(TrackingModule).trackYouTabEditProfilePress();
|
|
navigateToProfileCustomization();
|
|
if (result) {
|
|
env0_2(ContentDismissActionType.TAKE_ACTION);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function YouScreenUserProfileContent({user, style, navigateToProfileCustomization, navigateToFriends, navigateToPremium, navigateToShop, initialTab, animateAvatar}) { // fn#112841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15113:1499, offset: 0x023de168, size: 2298 bytes, params: 2, frame: 58
|
|
var object4;
|
|
const navigateToShop2 = navigateToShop;
|
|
const initialTab2 = initialTab;
|
|
animateAvatar = animateAvatar === undefined || animateAvatar;
|
|
const value4 = (UserProfileSharedStyles)();
|
|
const value5 = (moduleValue11).useNavigation();
|
|
const useUserProfileAnalyticsContext = UserProfileAnalyticsContextModule.useUserProfileAnalyticsContext;
|
|
const trackUserProfileAction = Reflect.apply(useUserProfileAnalyticsContext, UserProfileAnalyticsContextModule,
|
|
[]).trackUserProfileAction;
|
|
const value6 = (UseDisplayProfile)(user.id);
|
|
const value7 = (UserSettingToActivityModule).useCustomStatusActivity();
|
|
const value8 = (UseBadges)(value6);
|
|
const status = (require(566) /* metro dependency 566: flux */).useStateFromStores([SelfPresenceStore], function() {
|
|
return SelfPresenceStore.getStatus();
|
|
});
|
|
const value9 = (MobileVisualRefreshExperiment)('YouScreenUserProfileContent');
|
|
const {theme, primaryColor,
|
|
secondaryColor} = (UseProfileTheme)({user: user,
|
|
displayProfile: value6});
|
|
const value11 = primaryColor != null;
|
|
const {containerBackground, containerBorderColor, avatarBackground,
|
|
statusBackground} = (UseUserProfileColorsModule).useUserProfileColors({theme: theme,
|
|
primaryColor: primaryColor, secondaryColor: secondaryColor});
|
|
let binding = initialTab2;
|
|
const value13 = binding.useRef(null);
|
|
binding = initialTab2;
|
|
let useCallback = binding.useCallback;
|
|
const value14 = Reflect.apply(useCallback, binding, [_fun112843, [trackUserProfileAction]]);
|
|
const useVirtualCurrencyMobileEnabled = UseVirtualCurrencyMobileEnabledModule.useVirtualCurrencyMobileEnabled;
|
|
const enabled = Reflect.apply(useVirtualCurrencyMobileEnabled, UseVirtualCurrencyMobileEnabledModule, []).enabled;
|
|
binding = initialTab2;
|
|
let useState = binding.useState;
|
|
const value16 = navigateToShop2(Reflect.apply(useState, binding, [null]), 2);
|
|
let property = value16[0];
|
|
const property2 = value16[1];
|
|
const value19 = (UseShouldShowExpiringTrialOfferCardModule).useShouldShowExpiringTrialOfferCard();
|
|
const firstWishlistId = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserProfileStore],
|
|
function() {
|
|
return UserProfileStore.getFirstWishlistId(user.id);
|
|
});
|
|
const [property3, env0_19] = navigateToShop2(initialTab2.useState(0), 2);
|
|
const value22 = initialTab2.useCallback(_fun112845, []);
|
|
const {pageHeights,
|
|
handlePageContentSize} = (UseSegmentedPagesHeightModule).usePageHeights();
|
|
binding = initialTab2;
|
|
useState = binding.useState;
|
|
let WISHLIST = UserProfileSections.WISHLIST;
|
|
const value25 = navigateToShop2(Reflect.apply(useState, binding, [initialTab === WISHLIST]), 2);
|
|
const property4 = value25[0];
|
|
const env0_22 = value25[1];
|
|
const value26 = initialTab2.useCallback(_fun112846, [trackUserProfileAction]);
|
|
const value27 = (YouBarExperimentModule).useYouBarEnabled('YouScreenUserProfileContent');
|
|
const value28 = initialTab2.useCallback(_fun112847, [value7, property2]);
|
|
let useFocusEffect = moduleValue11.useFocusEffect;
|
|
binding = initialTab2;
|
|
useCallback = binding.useCallback;
|
|
Reflect.apply(useFocusEffect, moduleValue11, [Reflect.apply(useCallback, binding, [_fun112848, [value28,
|
|
value27]])]);
|
|
initialTab2.useEffect(_fun112849, [value28, value27]);
|
|
const r33 = property?.label();
|
|
const value32 = initialTab2.useMemo(_fun112853, [initialTab2.useCallback(_fun112851, [containerBackground,
|
|
containerBorderColor, value9, value4, navigateToPremium, value19, navigateToShop, value11, enabled, user,
|
|
value6, navigateToFriends]), initialTab2.useCallback(_fun112852, [value4.profileContent, firstWishlistId,
|
|
property3, property4]), handlePageContentSize]);
|
|
const useSegmentedControlState = SegmentedControlStateNativeModule.useSegmentedControlState;
|
|
object4 = {pageWidth: property3};
|
|
WISHLIST = UserProfileSections.WISHLIST;
|
|
object4.defaultIndex = initialTab !== WISHLIST ? 0 : 1;
|
|
const PX_24 = (Native).space.PX_24;
|
|
object4.itemSpacing = PX_24;
|
|
object4.items = value32;
|
|
object4.onPageChange = value26;
|
|
const value33 = Reflect.apply(useSegmentedControlState, SegmentedControlStateNativeModule, [object4]);
|
|
const value34 = (UseSegmentedPagesHeightModule).usePagesHeightStyle(value33,
|
|
pageHeights);
|
|
const env0_28 = initialTab2.useRef(value33.setActiveIndex);
|
|
initialTab2.useEffect(_fun112856, [value33]);
|
|
useFocusEffect = moduleValue11.useFocusEffect;
|
|
binding = initialTab2;
|
|
useCallback = binding.useCallback;
|
|
Reflect.apply(useFocusEffect, moduleValue11, [Reflect.apply(useCallback, binding, [_fun112857, [initialTab,
|
|
value5]])]);
|
|
const View2 = (ReanimatedRexport).View;
|
|
const LayerScope = (LayerScopeNativeModule).LayerScope;
|
|
const items3 = [value4.profileContentWrapper];
|
|
items3[1] = {paddingTop: 0};
|
|
const items2 = [
|
|
<YouAvatar_112837
|
|
user={user}
|
|
backgroundColor={avatarBackground}
|
|
statusStyle={{backgroundColor: statusBackground}}
|
|
animate={animateAvatar}
|
|
/>,
|
|
];
|
|
items2[1] = ((Component) => <Component ref={value13} customStatusActivity={value7} hasCustomProfileTheme={value11} style={[value4.customStatusBubble,
|
|
value4.customStatusBubbleInset]} emojiOnlyStyle={value4.emojiOnlyCustomStatusBubble} editEnabled placeholderText={r33} prompt={property} />)(importDefault(8513) /* metro dependency 8513: UserProfileCustomStatusBubble */);
|
|
const items4 = [value4.primaryInfo];
|
|
items4[1] = value4.profileContent;
|
|
const pronouns = value6?.pronouns;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const formatToPlainString = intl.formatToPlainString;
|
|
property = (require(1244) /* metro dependency 1244: indexNative */).t['er+FRD'];
|
|
const object = {};
|
|
object.status = (require(9122) /* metro dependency 9122: getChannelA11yLabel */).getStatusLabel(status);
|
|
const value36 = Reflect.apply(formatToPlainString, intl, [property, object]);
|
|
const string = intl.string;
|
|
const C6COaT = (require(1244) /* metro dependency 1244: indexNative */).t.C6COaT;
|
|
const value37 = Reflect.apply(string, intl, [C6COaT]);
|
|
const YOU_SCREEN = UserProfileThemeTypes.YOU_SCREEN;
|
|
items2[2] = (
|
|
<View style={items4}>
|
|
<UserProfilePrimaryInfo
|
|
user={user}
|
|
pronouns={pronouns}
|
|
badges={value8}
|
|
badgeContainerBackground={containerBackground}
|
|
onPressDisplayName={value14}
|
|
displayNameAccessibilityHint={'' + value36 + ', ' + value37}
|
|
themeType={YOU_SCREEN}
|
|
showChevron
|
|
/>
|
|
<EditSection_112839 navigateToProfileCustomization={navigateToProfileCustomization} />
|
|
</View>
|
|
);
|
|
const profileTablist = value4.profileTablist;
|
|
const Tabs = (TabsNativeModule).Tabs;
|
|
const view = (
|
|
<View style={profileTablist}>
|
|
<Tabs state={value33} variant={value11 ? 'gradient-background' : undefined} />
|
|
</View>
|
|
);
|
|
const View3 = (ReanimatedRexport).View;
|
|
const SegmentedControlPages = (SegmentedControlPagesNativeModule).SegmentedControlPages;
|
|
items2[3] = (
|
|
<View style={{flex: 1}} onLayout={value22}>
|
|
{view}
|
|
<View3 style={value34}>
|
|
<SegmentedControlPages state={value33} />
|
|
</View3>
|
|
</View>
|
|
);
|
|
return (
|
|
<View2 style={style}>
|
|
<LayerScope>
|
|
<View style={items3}>
|
|
{items2}
|
|
</View>
|
|
</LayerScope>
|
|
</View2>
|
|
);
|
|
function _fun112843() { // fn#112843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15113:2246, offset: 0x023dea75, size: 61 bytes, params: 1, frame: 12
|
|
trackUserProfileAction({action: 'PRESS_SET_STATUS'});
|
|
const value = environment.__proto__;
|
|
(ShowYouAccountActionSheetModule).showYouAccountActionSheet();
|
|
}
|
|
|
|
function _fun112845({nativeEvent}) { // fn#112845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15113:2597, offset: 0x023dead2, size: 36 bytes, params: 2, frame: 11
|
|
env0_19(nativeEvent.layout.width);
|
|
}
|
|
|
|
function _fun112846(a0) { // fn#112846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15113:2798, offset: 0x023deaf6, size: 76 bytes, params: 2, frame: 14
|
|
const value2 = a0 === 1;
|
|
env0_22(value2);
|
|
trackUserProfileAction({action: 'PRESS_SECTION',
|
|
section: value2 ? UserProfileSections.WISHLIST : UserProfileSections.MAIN});
|
|
}
|
|
|
|
function _fun112847() { // fn#112847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15113:2957, offset: 0x023deb42, size: 58 bytes, params: 1, frame: 13
|
|
var r1;
|
|
const binding = env0_15;
|
|
let value = null;
|
|
if (value == ConstantsModule2.UserProfileSections) {
|
|
value = environment.__proto__;
|
|
value = (importDefault(8524) /* metro dependency 8524: getRandomCustomStatusPrompt */)();
|
|
r1 = value;
|
|
} else {
|
|
r1 = value;
|
|
}
|
|
binding(r1);
|
|
}
|
|
|
|
function _fun112848() { // fn#112848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15113:3037, offset: 0x023deb7c, size: 24 bytes, params: 1, frame: 9
|
|
if (!env0_23) {
|
|
env0_24();
|
|
}
|
|
}
|
|
|
|
function _fun112849() { // fn#112849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15113:3076, offset: 0x023deb94, size: 38 bytes, params: 1, frame: 11
|
|
if (env0_23) {
|
|
global.setImmediate(_fun112850);
|
|
}
|
|
function _fun112850() { // fn#112850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15113:3099, offset: 0x023debba, size: 15 bytes, params: 1, frame: 9
|
|
env1_24();
|
|
}
|
|
|
|
}
|
|
|
|
function _fun112851() { // fn#112851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15113:3173, offset: 0x023debc9, size: 753 bytes, params: 1, frame: 24
|
|
const items4 = [env0_5.card];
|
|
if (ConstantsModule.UserProfileThemeTypes) {
|
|
items4[1] = {backgroundColor: containerBackground, borderColor: containerBorderColor, borderWidth: 1};
|
|
} else {
|
|
items4[1] = {backgroundColor: containerBackground};
|
|
}
|
|
const items2 = [env0_5.cards];
|
|
items2[1] = env0_5.profileContent;
|
|
const value3 = undefined;
|
|
const items3 = [
|
|
((Component) => <Component navigateToPremium={navigateToPremium} style={items4} />)(YouExpiringTrialOfferCard),
|
|
|
|
];
|
|
items3[1] = !env0_16 && ((Component) => <Component navigateToPremium={navigateToPremium} navigateToShop={navigateToShop} hasCustomProfileTheme={DismissibleContentConstantsModule.ContentDismissActionType} />)(importDefault(10352) /* metro dependency 10352: UserProfileDismissibleUpsells */);
|
|
items3[2] = enabled && ((Component) => <Component style={items4} />)(importDefault(14239) /* metro dependency 14239: BalanceWidgetMenu */);
|
|
let userBinding = user;
|
|
items3[3] = (
|
|
<UserProfileActivity
|
|
user={userBinding}
|
|
currentUser={userBinding}
|
|
style={ConstantsModule.UserProfileThemeTypes ? value3 : items4}
|
|
/>
|
|
);
|
|
items3[4] = ((Component) => <Component userId={user.id} displayProfile={env0_8} style={ConstantsModule.UserProfileThemeTypes ? value3 : items4} />)(importDefault(8762) /* metro dependency 8762: UserProfileAboutMeCard */);
|
|
items3[5] = ConstantsModule.UserProfileThemeTypes && ((Component) => <Component />)(importDefault(7331) /* metro dependency 7331: FormDivider */);
|
|
const UserProfileAccountConnectionsCard = (UserProfileConnectionsModule).UserProfileAccountConnectionsCard;
|
|
items3[6] = <UserProfileAccountConnectionsCard userId={user.id} style={ConstantsModule.UserProfileThemeTypes ? value3 : items4} />;
|
|
const UserProfileApplicationRoleConnectionsCard = (UserProfileConnectionsModule).UserProfileApplicationRoleConnectionsCard;
|
|
items3[7] = <UserProfileApplicationRoleConnectionsCard userId={user.id} style={ConstantsModule.UserProfileThemeTypes ? value3 : items4} />;
|
|
userBinding = user;
|
|
items3[8] = (
|
|
<UserProfileYourFriendsCard
|
|
userId={userBinding.id}
|
|
navigateToFriends={navigateToFriends}
|
|
style={items4}
|
|
/>
|
|
);
|
|
items3[9] = ((Component) => <Component userId={userBinding.id} style={ConstantsModule.UserProfileThemeTypes ? value3 : items4} />)(importDefault(10327) /* metro dependency 10327: UserProfileNote */);
|
|
return (
|
|
<View style={items2}>
|
|
{items3}
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function _fun112852() { // fn#112852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15113:3912, offset: 0x023deeba, size: 172 bytes, params: 1, frame: 20
|
|
var r0;
|
|
let value = environment.__proto__;
|
|
const profileContent = env0_5.profileContent;
|
|
if (firstWishlistId == null) {
|
|
const WishlistEmptyState = (require(10373) /* metro dependency 10373: UserProfileWishlistGrid */).WishlistEmptyState;
|
|
r0 = <WishlistEmptyState />;
|
|
} else {
|
|
value = undefined;
|
|
value = ((Component) => <Component wishlistId={firstWishlistId} containerWidth={env0_18 > 0 ? env0_18 : value} isVisible={env0_21} />)(importDefault(10373) /* metro dependency 10373: UserProfileWishlistGrid */);
|
|
r0 = value;
|
|
}
|
|
return (
|
|
<View style={profileContent}>
|
|
{r0}
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function _fun112853() { // fn#112853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15113:4110, offset: 0x023def66, size: 249 bytes, params: 1, frame: 22
|
|
let object = {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;
|
|
object.label = Reflect.apply(string, intl, [LXw470]);
|
|
object.page = (
|
|
<ScrollView
|
|
scrollEnabled={false}
|
|
onContentSizeChange={function(a0, a1) {
|
|
return handlePageContentSize(0, a0, a1);
|
|
}}
|
|
>
|
|
{env0_25()}
|
|
</ScrollView>
|
|
);
|
|
const items2 = [object];
|
|
object = {id: 'wishlist'};
|
|
object.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7lZ31J']);
|
|
object.page = (
|
|
<ScrollView
|
|
scrollEnabled={false}
|
|
onContentSizeChange={function(a0, a1) {
|
|
return handlePageContentSize(1, a0, a1);
|
|
}}
|
|
>
|
|
{env0_26()}
|
|
</ScrollView>
|
|
);
|
|
items2[1] = object;
|
|
return items2;
|
|
}
|
|
|
|
function _fun112856() { // fn#112856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15113:4645, offset: 0x023df094, size: 27 bytes, params: 1, frame: 2
|
|
env0_28.current = env0_27.setActiveIndex;
|
|
}
|
|
|
|
function _fun112857() { // fn#112857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15113:4726, offset: 0x023df0af, size: 82 bytes, params: 1, frame: 14
|
|
var environment;
|
|
var r1;
|
|
var WISHLIST;
|
|
var value;
|
|
let initialTabBinding = initialTab;
|
|
if (initialTabBinding !== undefined) {
|
|
initialTabBinding = initialTab;
|
|
value = environment.__proto__;
|
|
WISHLIST = UserProfileSections.WISHLIST;
|
|
value = 0;
|
|
r1 = initialTabBinding !== WISHLIST ? value : 1;
|
|
var env0_0 = global.setTimeout(_fun112858, 80);
|
|
}
|
|
return _fun112859;
|
|
function _fun112858() { // fn#112858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15113:4791, offset: 0x023df101, size: 56 bytes, params: 1, frame: 16
|
|
env1_28.current(env0_1, false, true);
|
|
env1_6.setParams({initialTab: undefined});
|
|
}
|
|
|
|
function _fun112859() { // fn#112859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15113:4861, offset: 0x023df139, size: 125 bytes, params: 1, frame: 12
|
|
var parent;
|
|
var setParams;
|
|
if (env0_0 != null) {
|
|
global.clearTimeout(env0_0);
|
|
}
|
|
let binding = env1_6;
|
|
if (!binding.isFocused()) {
|
|
binding = env1_6;
|
|
parent = binding.getParent();
|
|
if (parent != null && parent.isFocused()) {
|
|
binding = env1_6;
|
|
setParams = binding.setParams;
|
|
value = environment.__proto__.__proto__;
|
|
Reflect.apply(setParams, binding, [{initialTab: UserProfileSections.MAIN}]);
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun112836, 14916, [57, 31, 27, 6876, 5189, 8516, 6816, 1376, 33, 14911, 14746, 477, 8510, 8496, 8514,
|
|
7013, 1365, 8867, 4578, 9646, 697, 1244, 14917, 1485, 8490, 6882, 8501, 566, 1357, 8494, 8497, 4127, 14918,
|
|
10345, 5176, 8524, 14919, 10352, 14239, 10210, 8762, 7331, 10361, 14921, 10327, 10373, 8853, 4017, 6517, 8513,
|
|
8695, 9122, 8859, 8861,
|
|
2]) /* metro module 14916, dependencies: [57, 31, 27, 6876, 5189, 8516, 6816, 1376, 33, 14911, 14746, 477, 8510, 8496, 8514, 7013, 1365, 8867, 4578, 9646, 697, 1244, 14917, 1485, 8490, 6882, 8501, 566, 1357, 8494, 8497, 4127, 14918, 10345, 5176, 8524, 14919, 10352, 14239, 10210, 8762, 7331, 10361, 14921, 10327, 10373, 8853, 4017, 6517, 8513, 8695, 9122, 8859, 8861, 2] */;
|