Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,112 @@
|
||||
/* Metro module 13217; source: modules/user_profile/native/UserProfileFrameEditButton.tsx; dependencies: [57, 31, 27, 6816, 1376, 482, 33, 697, 4501, 10054, 7013, 1365, 8402, 8461, 1904, 4080, 13218, 1962, 1244, 13209, 5461, 1305, 10031, 8411, 2] */
|
||||
function _fun100831(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13407:6, offset: 0x021fb4be, size: 458 bytes, params: 8, frame: 25
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const COLLECTIBLES_PREVIEW_SIZE = (require(6816) /* metro dependency 6816: Constants */).COLLECTIBLES_PREVIEW_SIZE;
|
||||
const env0_7 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
|
||||
const env0_8 = (require(482) /* metro dependency 482: Constants */).NOOP;
|
||||
const env0_9 = (require(33) /* metro dependency 33 */).jsx;
|
||||
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object3 = {};
|
||||
const object4 = {height: COLLECTIBLES_PREVIEW_SIZE, width: COLLECTIBLES_PREVIEW_SIZE, paddingVertical: PX_4};
|
||||
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
|
||||
object4.backgroundColor = BACKGROUND_MOD_MUTED;
|
||||
object4.justifyContent = 'center';
|
||||
object4.alignItems = 'center';
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
object4.overflow = 'hidden';
|
||||
object3.previewContainer = object4;
|
||||
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
|
||||
object3.noneIcon = {tintColor: TEXT_SUBTLE};
|
||||
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object3.newBadge = {paddingTop: 0, marginLeft: PX_4};
|
||||
const env0_11 = Reflect.apply(createStyles, createStylesModule, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileFrameEditButton.tsx');
|
||||
exports.default = UserProfileFrameEditButton;
|
||||
}
|
||||
|
||||
function UserProfileFrameEditButton({displayProfile, user, pendingProfileFrame, guildId}) { // fn#100832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13407:681, offset: 0x021fb688, size: 1353 bytes, params: 2, frame: 31
|
||||
var object2;
|
||||
var r14;
|
||||
var r8;
|
||||
var r0;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var UserProfileEditFormButton;
|
||||
const env0_3 = undefined;
|
||||
const styles = useStyles();
|
||||
const value3 = (require(10054) /* metro dependency 10054: useCanPurchaseFrames */).useCanViewProfileFramesInCollectiblesShop('UserProfileFrameEditButton');
|
||||
const useSelectedDismissibleContentModule = require(7013) /* metro dependency 7013: useSelectedDismissibleContent */;
|
||||
const useSelectedDismissibleContent = useSelectedDismissibleContentModule.useSelectedDismissibleContent;
|
||||
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
|
||||
const PROFILE_FRAME_USER_PROFILE_NEW_BADGE = DismissibleContent.PROFILE_FRAME_USER_PROFILE_NEW_BADGE;
|
||||
const value5 = env0_3(Reflect.apply(useSelectedDismissibleContent, useSelectedDismissibleContentModule,
|
||||
[[PROFILE_FRAME_USER_PROFILE_NEW_BADGE]]), 2);
|
||||
const property = value5[0];
|
||||
const property2 = value5[1];
|
||||
const profileCustomizationUtilsModule = require(8402) /* metro dependency 8402: ProfileCustomizationUtils */;
|
||||
const getProfilePreviewValue = profileCustomizationUtilsModule.getProfilePreviewValue;
|
||||
object2 = {pendingValue: pendingProfileFrame};
|
||||
object2.userValue = displayProfile == null || displayProfile._userProfile == null ? undefined : displayProfile._userProfile.profileFrame;
|
||||
object2.guildValue = displayProfile == null || displayProfile._guildMemberProfile == null ? undefined : displayProfile._guildMemberProfile.profileFrame;
|
||||
object2.guildId = guildId;
|
||||
const {product,
|
||||
isFetching} = (require(8461) /* metro dependency 8461: useFetchCollectiblesProduct */).useFetchCollectiblesProduct(Reflect.apply(getProfilePreviewValue,
|
||||
profileCustomizationUtilsModule, [object2])?.skuId);
|
||||
const type = product == null || product.items[0] == null ? undefined : product.items[0].type;
|
||||
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
|
||||
const PROFILE_FRAME = CollectiblesItemType.PROFILE_FRAME;
|
||||
const r11 = type !== PROFILE_FRAME ? undefined : product.items[0];
|
||||
const moduleValue5 = profileCustomizationUtilsModule;
|
||||
const useUserProfileFrame = moduleValue5.useUserProfileFrame;
|
||||
const r1 = pendingProfileFrame === undefined ? Reflect.apply(useUserProfileFrame, moduleValue5, [{user: user,
|
||||
guildId: guildId}]) : pendingProfileFrame;
|
||||
const binding = env0_4;
|
||||
const useCallback = binding.useCallback;
|
||||
if (value3) {
|
||||
r14 = product?.name ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PoWNfe);
|
||||
r8 = guildId == null || r1 != null ? r14 : intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.ep5D4i,
|
||||
|
||||
{label: r14});
|
||||
UserProfileEditFormButton = (require(13209) /* metro dependency 13209: UserProfileEditFormControls */).UserProfileEditFormButton;
|
||||
if (isFetching) {
|
||||
object2 = {};
|
||||
object2.label = intl.string(t.GWrZOd);
|
||||
object2.buttonText = intl.string(t.MKDeyL);
|
||||
object2.onPress = NOOP;
|
||||
object2.leading = ((ActivityIndicator) => <ActivityIndicator animating size="large" />)((require(5461) /* metro dependency 5461: ActivityIndicatorNative */).ActivityIndicator);
|
||||
object2.loading = true;
|
||||
object2.disabled = true;
|
||||
object2.hideArrow = true;
|
||||
r0 = object2;
|
||||
} else {
|
||||
object2 = {};
|
||||
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.GWrZOd);
|
||||
object2.labelTrailing = property !== (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.PROFILE_FRAME_USER_PROFILE_NEW_BADGE ? undefined : <View {...{['aria-hidden']: true}}>{((TextBadge) => <TextBadge text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y2b7CA)} style={styles.newBadge} />)((require(1305) /* metro dependency 1305: native */).TextBadge)}</View>;
|
||||
object2.buttonText = r8;
|
||||
object2.accessibilityValue = {text: r8};
|
||||
object2.onPress = Reflect.apply(useCallback, binding, [_fun100833, [r1, guildId, user, property2]]);
|
||||
object2.leading = r11 != null ? <View style={styles.previewContainer}>{((Component) => <Component profileFrame={r11} previewWidth={COLLECTIBLES_PREVIEW_SIZE - 2 * (importDefault(697) /* metro dependency 697: native */).space.PX_8} previewHeight={COLLECTIBLES_PREVIEW_SIZE - 2 * PX_4} profileBackgroundColor={(importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH} />)(importDefault(10031) /* metro dependency 10031: ProfileFrameSamplePreview */)}</View> : ((Icon) => <Icon source={importDefault(8411) /* metro dependency 8411 */} style={styles.noneIcon} />)((require(1305) /* metro dependency 1305: native */).Icon);
|
||||
r0 = object2;
|
||||
}
|
||||
return <UserProfileEditFormButton {...r0} />;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function _fun100833() { // fn#100833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13407:1497, offset: 0x021fbbd1, size: 129 bytes, params: 1, frame: 18
|
||||
const defaultImport = importDefault(dependencyMap[15]);
|
||||
defaultImport.openLazy(require(dependencyMap[17])(dependencyMap[16], dependencyMap.paths), 'Profile Frame',
|
||||
{user: user, currentProfileFrame: env0_3, guildId: guildId});
|
||||
const binding = env0_2;
|
||||
const TAKE_ACTION = ContentDismissActionType.TAKE_ACTION;
|
||||
binding(TAKE_ACTION);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user