522 lines
30 KiB
TypeScript
522 lines
30 KiB
TypeScript
/* Metro module 8631; source: modules/messages/native/emoji/CustomEmojiContent.tsx; dependencies: [31, 27, 6541, 3969, 1878, 661, 33, 4501, 697, 3802, 683, 5080, 7028, 1962, 4080, 8625, 566, 6771, 3800, 6545, 3777, 8533, 6796, 3829, 8632, 7007, 8626, 8633, 8635, 4573, 1244, 8629, 3857, 8637, 8638, 1305, 4578, 5475, 8640, 7972, 8641, 8645, 2] */
|
|
import AnalyticsUtils from '../../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
|
|
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
|
|
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
|
|
import PremiumUtils from '../../../../utils/PremiumUtils.tsx'; /* Metro dependency 3802 */
|
|
import SelectedGuildStore from '../../../../stores/SelectedGuildStore.tsx'; /* Metro dependency 3969 */
|
|
import FastImage from '../../../../components_native/common/FastImage.tsx'; /* Metro dependency 5475 */
|
|
import SubscriptionRoleStore from '../../../guild_role_subscriptions/SubscriptionRoleStore.tsx'; /* Metro dependency 6541 */
|
|
import UseAnalyticsLocations from '../../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
|
|
import TidaWebformExperiment from '../../../guild/TidaWebformExperiment.tsx'; /* Metro dependency 6796 */
|
|
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 IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
|
|
import * as UserSettingsModule from '../../../user_settings/UserSettings.tsx'; /* Metro dependency 3829 */
|
|
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
|
|
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
|
|
import * as OpenUserSettingsModule from '../../../user_settings/core/native/openUserSettings.tsx'; /* Metro dependency 7007 */
|
|
import * as EmojiPickerUtilsModule from '../../../emoji_picker/EmojiPickerUtils.tsx'; /* Metro dependency 8533 */
|
|
import * as UseSharedMessageEmojiStylesModule from './useSharedMessageEmojiStyles.tsx'; /* Metro dependency 8625 */
|
|
import * as EmojiActionCreatorsModule from '../../../../actions/EmojiActionCreators.tsx'; /* Metro dependency 8629 */
|
|
import * as GetEmojiPopoutMessageModule from '../../getEmojiPopoutMessage.tsx'; /* Metro dependency 8632 */
|
|
import * as StarOutlineIconModule from '../../../../design/components/Icon/native/redesign/generated/StarOutlineIcon.tsx'; /* Metro dependency 8635 */
|
|
import * as GuildUtilsModule from '../../../guild/GuildUtils.tsx'; /* Metro dependency 8640 */
|
|
|
|
function _fun68107(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68107, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:6, offset: 0x01c3ec6f, size: 687 bytes, params: 8, frame: 22
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ReactNativeModule;
|
|
const env0_5 = value.Pressable;
|
|
const env0_6 = value.View;
|
|
value = require(661) /* metro dependency 661: Constants */;
|
|
const env0_10 = value.UserSettingsSections;
|
|
const env0_11 = value.AnalyticEvents;
|
|
const env0_12 = value.AnalyticsPages;
|
|
const env0_13 = value.AnalyticsSections;
|
|
value = require(33) /* metro dependency 33 */;
|
|
const env0_14 = value.jsx;
|
|
const env0_15 = value.jsxs;
|
|
const env0_16 = value.Fragment;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object = {nitroWheel: {'height': 32, 'width': 32}};
|
|
const CONTROL_BRAND_FOREGROUND_NEW = (Native).colors.CONTROL_BRAND_FOREGROUND_NEW;
|
|
object.nitroWheelPurple = {tintColor: CONTROL_BRAND_FOREGROUND_NEW};
|
|
object.emojiDescriptionWrapperOuter = {'flexDirection': 'row', 'flex': 1, 'alignItems': 'center', 'gap': 8};
|
|
object.starIcon = {'height': 32, 'width': 32, 'margin': 0, 'padding': 0, 'flex': 0};
|
|
const ICON_FEEDBACK_WARNING = (Native).colors.ICON_FEEDBACK_WARNING;
|
|
object.starIconSelected = {tintColor: ICON_FEEDBACK_WARNING};
|
|
const INTERACTIVE_TEXT_DEFAULT = (Native).colors.INTERACTIVE_TEXT_DEFAULT;
|
|
object.starIconUnselected = {tintColor: INTERACTIVE_TEXT_DEFAULT};
|
|
const INTERACTIVE_ICON_DEFAULT = (Native).colors.INTERACTIVE_ICON_DEFAULT;
|
|
object.moreMenuIcon = {'height': 32, 'width': 32, 'justifyContent': 'center', 'alignItems': 'center',
|
|
color: INTERACTIVE_ICON_DEFAULT};
|
|
object.bottomCtaButton = {marginTop: 24};
|
|
object.ctaDescriptionWrapper = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center',
|
|
'justifyContent': 'flex-start', 'marginTop': 8};
|
|
const WHITE = (Native).colors.WHITE;
|
|
object.betaTag = {backgroundColor: WHITE};
|
|
const BRAND_530 = (Native).unsafe_rawColors.BRAND_530;
|
|
object.betaTagTextAddPack = {color: BRAND_530};
|
|
const PRIMARY_500 = (Native).unsafe_rawColors.PRIMARY_500;
|
|
object.betaTagTextRemovePack = {color: PRIMARY_500};
|
|
const PX_4 = (Native).space.PX_4;
|
|
object.favoriteButtonContainer = {paddingTop: PX_4};
|
|
const env0_17 = Reflect.apply(createStyles, value, [object]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/messages/native/emoji/CustomEmojiContent.tsx');
|
|
exports.default = _default_68108;
|
|
function _default_68108({emojiNode, sourceType, expressionSourceApplication, expressionSourceGuild, customEmojiFromJoinedGuild, hasJoinedEmojiSourceGuild, nonce}) { // fn#68108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:1227, offset: 0x01c3ef1e, size: 2595 bytes, params: 2, frame: 49
|
|
const Text = (TextModule).Text;
|
|
var r19;
|
|
var r32;
|
|
var r27;
|
|
var r5;
|
|
var r16;
|
|
var moduleValue4;
|
|
var object;
|
|
var StarOutlineIcon;
|
|
var object4;
|
|
var StarIcon;
|
|
var object7;
|
|
const Button = (ButtonNativeModule).Button;
|
|
var jsxRuntimeEnv0_16Binding2;
|
|
var items9;
|
|
var jsxRuntimeEnv0_16Binding3;
|
|
var items11;
|
|
const _default_68108CloseActionSheet = function() {
|
|
importDefault(dependencyMap[14]).hideActionSheet();
|
|
var defaultImport2 = importDefault(dependencyMap[10]);
|
|
var CLOSE_POPOUT = AnalyticEvents.CLOSE_POPOUT;
|
|
defaultImport2.track(CLOSE_POPOUT, {nonce: nonce});
|
|
};
|
|
let object10 = {};
|
|
const styles = useStyles();
|
|
copyDataProperties(object10, styles, undefined);
|
|
const useSharedMessageEmojiStyles = UseSharedMessageEmojiStylesModule.useSharedMessageEmojiStyles;
|
|
copyDataProperties(object10, Reflect.apply(useSharedMessageEmojiStyles, UseSharedMessageEmojiStylesModule, []),
|
|
undefined);
|
|
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
|
return UserStore.getCurrentUser();
|
|
});
|
|
const isPremium2 = (PremiumUtils).isPremium(currentUser);
|
|
const guildId2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SelectedGuildStore],
|
|
function() {
|
|
return SelectedGuildStore.getGuildId();
|
|
});
|
|
const r15 = guildId2 != null && guildId2 === expressionSourceGuild?.id;
|
|
const env0_8 = (UseAnalyticsLocations)().analyticsLocations;
|
|
const {isRoleSubscriptionEmoji, isUnusableRoleSubscriptionEmoji, userIsRoleSubscriber} = ReactModule.useMemo(_fun68112,
|
|
[customEmojiFromJoinedGuild, guildId2]);
|
|
const value7 = !isUnusableRoleSubscriptionEmoji;
|
|
let r1 = isUnusableRoleSubscriptionEmoji ? customEmojiFromJoinedGuild?.type !== (require(3800) /* metro dependency 3800: EmojiTypes */).EmojiTypes.GUILD : value7;
|
|
if (r1) {
|
|
r19 = !r1;
|
|
} else {
|
|
moduleValue4 = require(3777) /* metro dependency 3777: CreatorMonetizationRestrictionsUtils */;
|
|
r19 = moduleValue4.shouldHideGuildPurchaseEntryPoints(customEmojiFromJoinedGuild?.guildId);
|
|
}
|
|
const value10 = (EmojiPickerUtilsModule).useIsFavoriteEmoji(guildId2,
|
|
customEmojiFromJoinedGuild);
|
|
let defaultImport2 = TidaWebformExperiment;
|
|
const useExperiment = defaultImport2.useExperiment;
|
|
const tidaWebformEnabled = Reflect.apply(useExperiment, defaultImport2, [{location: 'CustomEmojiContent'},
|
|
{autoTrackExposure: false}]).tidaWebformEnabled;
|
|
const DeveloperMode = (UserSettingsModule).DeveloperMode;
|
|
const value11 = DeveloperMode.useSetting();
|
|
r1 = expressionSourceGuild?.isDiscoverable();
|
|
const r9 = r1 != null && r1;
|
|
const object12 = {};
|
|
object12.page = guildId2 != null ? AnalyticsPages.GUILD_CHANNEL : AnalyticsPages.DM_CHANNEL;
|
|
const EMOJI_UPSELL_POPOUT = AnalyticsSections.EMOJI_UPSELL_POPOUT;
|
|
object12.section = EMOJI_UPSELL_POPOUT;
|
|
const emojiPopoutData = (GetEmojiPopoutMessageModule).getEmojiPopoutData({sourceType: sourceType,
|
|
expressionSourceApplication: expressionSourceApplication, isPremium: isPremium2,
|
|
hasJoinedEmojiSourceGuild: hasJoinedEmojiSourceGuild, isRoleSubscriptionEmoji: isRoleSubscriptionEmoji,
|
|
isUnusableRoleSubscriptionEmoji: isUnusableRoleSubscriptionEmoji, userIsRoleSubscriber: userIsRoleSubscriber,
|
|
shouldHideRoleSubscriptionCTA: r19, emojiComesFromCurrentGuild: r15, isDiscoverable: r9,
|
|
onOpenPremiumSettings: onOpenPremiumSettings});
|
|
(require(8626) /* metro dependency 8626: useTrackOpenPopout */).useTrackOpenPopout({emojiId: emojiNode.id,
|
|
currentGuildId: guildId2, popoutData: emojiPopoutData, emojiSourceGuildId: expressionSourceGuild?.id,
|
|
nonce: nonce});
|
|
const emojiDescription = emojiPopoutData.emojiDescription;
|
|
const type = emojiPopoutData.type;
|
|
const onPress_681152 = onPress_68115;
|
|
const r8 = isUnusableRoleSubscriptionEmoji ? value7 : hasJoinedEmojiSourceGuild;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
let string = intl.string;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
const r25 = hasJoinedEmojiSourceGuild ? Reflect.apply(string, intl, [t.ohTzZH]) : Reflect.apply(string, intl,
|
|
[t['eLfh+a']]);
|
|
const EmojiPopoutType = (GetEmojiPopoutMessageModule).EmojiPopoutType;
|
|
let JOIN_GUILD = EmojiPopoutType.JOIN_GUILD;
|
|
const value16 = type === JOIN_GUILD;
|
|
const object13 = {};
|
|
let GET_PREMIUM = EmojiPopoutType.GET_PREMIUM;
|
|
const items4 = [GET_PREMIUM];
|
|
JOIN_GUILD = EmojiPopoutType.JOIN_GUILD;
|
|
items4[1] = JOIN_GUILD;
|
|
copyDataProperties(object13, items4.includes(type) ? object10.ctaButton : object10.bottomCtaButton, undefined);
|
|
object13['borderRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.xl;
|
|
const jsxRuntimeEnv0_16Binding = jsxRuntimeEnv0_16;
|
|
const object14 = {};
|
|
copyDataProperties(object14, object10.emojiContainer, undefined);
|
|
object14['marginTop'] = 8;
|
|
const value17 = ((Component) => <Component style={object10.emojiIcon} source={{uri: emojiNode.src}} />)(FastImage);
|
|
const emojiDescriptionWrapperOuter = object10.emojiDescriptionWrapperOuter;
|
|
const items7 = [
|
|
<View style={object10.emojiDescriptionWrapper}>
|
|
<Text variant="text-md/bold" color="mobile-text-heading-primary">
|
|
{':' + emojiNode.alt + ':'}
|
|
</Text>
|
|
{emojiDescription != null && <Text variant="text-sm/medium">{emojiDescription}</Text>}
|
|
</View>,
|
|
];
|
|
if (r8) {
|
|
if (tidaWebformEnabled) {
|
|
r27 = null;
|
|
} else {
|
|
object = {};
|
|
string = intl.string;
|
|
r32 = value10 ? Reflect.apply(string, intl, [t.aBUcp3]) : Reflect.apply(string, intl, [t.yZFibY]);
|
|
object.accessibilityLabel = r32;
|
|
object.style = object10.moreMenuIcon;
|
|
object.onPress = onPress_681152;
|
|
if (value10) {
|
|
StarIcon = (require(8633) /* metro dependency 8633: StarIcon */).StarIcon;
|
|
object7 = {};
|
|
copyDataProperties(object7, object10.starIcon, undefined);
|
|
copyDataProperties(object7, object10.starIconSelected, undefined);
|
|
r32 = <StarIcon style={object7} />;
|
|
} else {
|
|
StarOutlineIcon = (require(8635) /* metro dependency 8635: StarOutlineIcon */).StarOutlineIcon;
|
|
object4 = {};
|
|
copyDataProperties(object4, object10.starIconUnselected, copyDataProperties(object4, object10.starIcon,
|
|
undefined));
|
|
r32 = <StarOutlineIcon style={object4} />;
|
|
}
|
|
r27 = (
|
|
<Pressable {...object}>
|
|
{r32}
|
|
</Pressable>
|
|
);
|
|
}
|
|
} else {
|
|
r27 = null;
|
|
}
|
|
items7[1] = r27;
|
|
items7[2] = (
|
|
tidaWebformEnabled && value11
|
|
? (
|
|
<Pressable
|
|
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PdRCRg)}
|
|
style={object10.moreMenuIcon}
|
|
onPress={onPress_68119}
|
|
>
|
|
{((MoreHorizontalIcon) => <MoreHorizontalIcon color={(importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT} />)((require(8638) /* metro dependency 8638: MoreHorizontalIcon */).MoreHorizontalIcon)}
|
|
</Pressable>
|
|
)
|
|
: null
|
|
);
|
|
const items8 = [
|
|
<View style={object14}>
|
|
{value17}
|
|
<View style={emojiDescriptionWrapperOuter}>
|
|
{items7}
|
|
</View>
|
|
</View>,
|
|
];
|
|
GET_PREMIUM = EmojiPopoutType.GET_PREMIUM;
|
|
items8[1] = (
|
|
type === GET_PREMIUM
|
|
? renderPremiumUpsellButton()
|
|
: (
|
|
value16
|
|
? (
|
|
<View style={object13}>
|
|
<Button
|
|
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.riu2R5)}
|
|
size="md"
|
|
grow
|
|
onPress={onPress_68123}
|
|
/>
|
|
</View>
|
|
)
|
|
: null
|
|
)
|
|
);
|
|
if (hasJoinedEmojiSourceGuild) {
|
|
if (expressionSourceGuild == null) {
|
|
r5 = null;
|
|
} else {
|
|
jsxRuntimeEnv0_16Binding2 = jsxRuntimeEnv0_16;
|
|
const FormDivider = (require(7972) /* metro dependency 7972: native */).FormDivider;
|
|
items9 = [
|
|
<FormDivider style={object10.divider} />,
|
|
];
|
|
items9[1] = ((Component) => <Component guild={expressionSourceGuild} hasJoinedGuild={hasJoinedEmojiSourceGuild} title={r25} showingJoinGuildCta={value16} />)(importDefault(8641) /* metro dependency 8641: ExpressionGuildDetails */);
|
|
items9[2] = !hasJoinedEmojiSourceGuild && ((EmojiGrid) => <EmojiGrid expressionSourceGuild={expressionSourceGuild} doNotDisplayEmojiIds={[emojiNode.id]} />)((require(8645) /* metro dependency 8645: EmojiGrid */).EmojiGrid);
|
|
r5 = (
|
|
<>
|
|
{items9}
|
|
</>
|
|
);
|
|
}
|
|
} else if (r9) {
|
|
if (expressionSourceGuild == null) {
|
|
r5 = null;
|
|
} else {
|
|
jsxRuntimeEnv0_16Binding2 = jsxRuntimeEnv0_16;
|
|
const FormDivider2 = (require(7972) /* metro dependency 7972: native */).FormDivider;
|
|
items9 = [
|
|
<FormDivider2 style={object10.divider} />,
|
|
];
|
|
items9[1] = ((Component) => <Component guild={expressionSourceGuild} hasJoinedGuild={hasJoinedEmojiSourceGuild} title={r25} showingJoinGuildCta={value16} />)(importDefault(8641) /* metro dependency 8641: ExpressionGuildDetails */);
|
|
items9[2] = !hasJoinedEmojiSourceGuild && ((EmojiGrid) => <EmojiGrid expressionSourceGuild={expressionSourceGuild} doNotDisplayEmojiIds={[emojiNode.id]} />)((require(8645) /* metro dependency 8645: EmojiGrid */).EmojiGrid);
|
|
r5 = (
|
|
<>
|
|
{items9}
|
|
</>
|
|
);
|
|
}
|
|
} else {
|
|
r5 = null;
|
|
}
|
|
items8[2] = r5;
|
|
if (r8) {
|
|
if (tidaWebformEnabled) {
|
|
jsxRuntimeEnv0_16Binding3 = jsxRuntimeEnv0_16;
|
|
const FormDivider3 = (require(7972) /* metro dependency 7972: native */).FormDivider;
|
|
items11 = [
|
|
<FormDivider3 style={object10.divider} />,
|
|
];
|
|
var viewBindingProps = {style: object10.favoriteButtonContainer};
|
|
object10 = {};
|
|
string = intl.string;
|
|
r16 = value10 ? Reflect.apply(string, intl, [t.Ay49KA]) : Reflect.apply(string, intl, [t.nNsr67]);
|
|
object10.text = r16;
|
|
r16 = value10 ? 'tertiary' : 'primary';
|
|
object10.variant = r16;
|
|
object10.size = 'md';
|
|
object10.onPress = onPress_681152;
|
|
items11[1] = (
|
|
<View {...viewBindingProps}>
|
|
<Button {...object10} />
|
|
</View>
|
|
);
|
|
r5 = (
|
|
<>
|
|
{items11}
|
|
</>
|
|
);
|
|
} else {
|
|
r5 = null;
|
|
}
|
|
} else {
|
|
r5 = null;
|
|
}
|
|
items8[3] = r5;
|
|
return (
|
|
<>
|
|
{items8}
|
|
</>
|
|
);
|
|
function _fun68112() { // fn#68112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:1748, offset: 0x01c3f9a8, size: 212 bytes, params: 1, frame: 20
|
|
var r0;
|
|
var type;
|
|
var value2;
|
|
var object;
|
|
var moduleValue;
|
|
var isPurchasableRoleSubscriptionEmoji;
|
|
var moduleValue2;
|
|
var subscriptionRoleStoreBinding;
|
|
let customEmojiFromJoinedGuildBinding = customEmojiFromJoinedGuild;
|
|
if (customEmojiFromJoinedGuildBinding == null) {
|
|
r0 = {'isRoleSubscriptionEmoji': false, 'isUnusableRoleSubscriptionEmoji': false,
|
|
'userIsRoleSubscriber': false};
|
|
} else {
|
|
type = customEmojiFromJoinedGuild.type;
|
|
value2 = environment.__proto__;
|
|
if (type !== (require(3800) /* metro dependency 3800: EmojiTypes */).EmojiTypes.GUILD) {
|
|
r0 = {'isRoleSubscriptionEmoji': false, 'isUnusableRoleSubscriptionEmoji': false,
|
|
'userIsRoleSubscriber': false};
|
|
} else {
|
|
object = {};
|
|
moduleValue = importAll(6545) /* metro dependency 6545: RoleSubscriptionEmojiUtils */;
|
|
isPurchasableRoleSubscriptionEmoji = moduleValue.isPurchasableRoleSubscriptionEmoji;
|
|
customEmojiFromJoinedGuildBinding = customEmojiFromJoinedGuild;
|
|
object.isRoleSubscriptionEmoji = Reflect.apply(isPurchasableRoleSubscriptionEmoji, moduleValue,
|
|
[customEmojiFromJoinedGuildBinding]);
|
|
moduleValue2 = importAll(6545) /* metro dependency 6545: RoleSubscriptionEmojiUtils */;
|
|
object.isUnusableRoleSubscriptionEmoji = moduleValue2.isUnusableRoleSubscriptionEmoji(customEmojiFromJoinedGuildBinding,
|
|
|
|
|
|
guildId ?? undefined);
|
|
subscriptionRoleStoreBinding = SubscriptionRoleStore;
|
|
object.userIsRoleSubscriber = subscriptionRoleStoreBinding.getUserSubscriptionRoles(customEmojiFromJoinedGuild.guildId).size > 0;
|
|
r0 = object;
|
|
}
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function onOpenPremiumSettings() { // fn#68113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:2940, owner: _default_68108.onOpenPremiumSettings, offset: 0x01c3fa7c, size: 151 bytes, params: 1, frame: 18
|
|
_default_68108CloseActionSheet();
|
|
const defaultImport = AnalyticsUtils;
|
|
const track = defaultImport.track;
|
|
const PREMIUM_PROMOTION_OPENED = AnalyticEvents.PREMIUM_PROMOTION_OPENED;
|
|
Reflect.apply(track, defaultImport, [PREMIUM_PROMOTION_OPENED, {location_page: env0_10.page,
|
|
location_section: env0_10.section}]);
|
|
const openUserSettings = OpenUserSettingsModule.openUserSettings;
|
|
const PREMIUM = UserSettingsSections.PREMIUM;
|
|
Reflect.apply(openUserSettings, OpenUserSettingsModule, [{screen: PREMIUM, params: {analyticsLocation: env0_10}}]);
|
|
}
|
|
|
|
function renderStarIcon({isSelected}) { // fn#68114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:3305, owner: _default_68108.renderStarIcon, offset: 0x01c3fb13, size: 158 bytes, params: 2, frame: 16
|
|
const object = {};
|
|
const binding = env0_5;
|
|
copyDataProperties(object, binding.starIcon, undefined);
|
|
if (isSelected) {
|
|
copyDataProperties(object, binding.starIconSelected, undefined);
|
|
value = environment.__proto__;
|
|
const StarIcon = (require(8633) /* metro dependency 8633: StarIcon */).StarIcon;
|
|
return <StarIcon style={object} />;
|
|
}
|
|
copyDataProperties(object, binding.starIconUnselected, undefined);
|
|
const StarOutlineIcon = (StarOutlineIconModule).StarOutlineIcon;
|
|
return <StarOutlineIcon style={object} />;
|
|
}
|
|
|
|
function _default_68108OnPress() { // fn#68115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:3528, owner: _default_68108.onPress, offset: 0x01c3fbb1, size: 194 bytes, params: 1, frame: 19
|
|
var value;
|
|
_default_68108CloseActionSheet();
|
|
const content2 = content;
|
|
const binding = env0_9;
|
|
if (binding) {
|
|
EmojiActionCreatorsModule.unfavoriteEmoji(customEmojiFromJoinedGuild);
|
|
value = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
|
|
value.open({key: 'EMOJI_UNFAVORITED', icon: function() {
|
|
return renderStarIcon({isSelected: false});
|
|
}, content: content2});
|
|
} else {
|
|
EmojiActionCreatorsModule.favoriteEmoji(customEmojiFromJoinedGuild);
|
|
value = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
|
|
value.open({key: 'EMOJI_FAVORITED', icon: icon, content: content2});
|
|
}
|
|
function content() { // fn#68116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:3564, owner: _default_68108.onPress.content, offset: 0x01c3fc73, size: 154 bytes, params: 1, frame: 19
|
|
const value = environment.__proto__.__proto__;
|
|
const Text = (TextModule).Text;
|
|
const binding = env1_9;
|
|
const intl = (IndexNativeModule).intl;
|
|
const string = intl.string;
|
|
const t = (IndexNativeModule).t;
|
|
return (
|
|
<Text style={{'marginLeft': 8, 'marginTop': 2}} variant="text-md/bold">
|
|
{binding ? Reflect.apply(string, intl, [t.in1rga]) : Reflect.apply(string, intl, [t.mE2e8A])}
|
|
</Text>
|
|
);
|
|
}
|
|
|
|
function onPressIcon_68118() { // fn#68118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:3933, owner: _default_68108.onPress.icon, offset: 0x01c3fd26, size: 25 bytes, params: 1, frame: 11
|
|
return renderStarIcon({isSelected: true});
|
|
}
|
|
|
|
}
|
|
|
|
function _default_68108OnPress_68119() { // fn#68119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:4016, owner: _default_68108.onPress, offset: 0x01c3fd3f, size: 107 bytes, params: 1, frame: 18
|
|
let value = environment.__proto__;
|
|
const defaultImport = importDefault(dependencyMap[14]);
|
|
const openLazy = defaultImport.openLazy;
|
|
value = require(dependencyMap[13]);
|
|
value = value(dependencyMap[33], dependencyMap.paths);
|
|
Reflect.apply(openLazy, defaultImport, [value, 'EmojiOptionsActionSheet', {emojiSrc: emojiNode.src}, 'stack']);
|
|
}
|
|
|
|
function renderNitroWheel() { // fn#68120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:4270, owner: _default_68108.renderNitroWheel, offset: 0x01c3fdaa, size: 129 bytes, params: 1, frame: 15
|
|
var r4;
|
|
var object;
|
|
let value = a0;
|
|
let shouldTintPurple = (value !== undefined ? value : {shouldTintPurple: false}).shouldTintPurple;
|
|
shouldTintPurple = !(shouldTintPurple === undefined) && shouldTintPurple;
|
|
const binding = env0_5;
|
|
const nitroWheel = binding.nitroWheel;
|
|
if (shouldTintPurple) {
|
|
object = {};
|
|
copyDataProperties(object, nitroWheel, undefined);
|
|
copyDataProperties(object, binding.nitroWheelPurple, undefined);
|
|
r4 = object;
|
|
} else {
|
|
r4 = nitroWheel;
|
|
}
|
|
value = environment.__proto__;
|
|
const NitroWheel = (NativeModule).NitroWheel;
|
|
return <NitroWheel style={r4} />;
|
|
}
|
|
|
|
function renderPremiumUpsellButton() { // fn#68121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:4602, owner: _default_68108.renderPremiumUpsellButton, offset: 0x01c3fe2b, size: 167 bytes, params: 1, frame: 18
|
|
const typeBinding = type;
|
|
const EmojiPopoutType = (GetEmojiPopoutMessageModule).EmojiPopoutType;
|
|
const GET_PREMIUM = EmojiPopoutType.GET_PREMIUM;
|
|
return (
|
|
typeBinding !== GET_PREMIUM
|
|
? null
|
|
: (
|
|
<View style={env0_15}>
|
|
{((Button) => <Button icon={renderNitroWheel()} text={env0_11.text} variant="active" size="md" grow onPress={onPress_68122} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}
|
|
</View>
|
|
)
|
|
);
|
|
function renderPremiumUpsellButtonOnPress() { // fn#68122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:4772, owner: _default_68108.renderPremiumUpsellButton.onPress, offset: 0x01c3fed2, size: 218 bytes, params: 1, frame: 20
|
|
var r1;
|
|
var defaultImport;
|
|
var defaultImport2;
|
|
var pushLazy;
|
|
let value = environment.__proto__;
|
|
const currentUserBinding = currentUser;
|
|
const binding = env1_10;
|
|
const analyticsLocationsBinding = analyticsLocations;
|
|
const _default_68108CloseActionSheetBinding = _default_68108CloseActionSheet;
|
|
value = currentUserBinding == null;
|
|
if (value) {
|
|
r1 = value;
|
|
} else {
|
|
value = environment.__proto__.__proto__;
|
|
value = importDefault(dependencyMap[9]);
|
|
value = value.canUseEmojisEverywhere(currentUserBinding);
|
|
r1 = value;
|
|
}
|
|
if (!r1) {
|
|
_default_68108CloseActionSheetBinding();
|
|
value = environment.__proto__.__proto__;
|
|
defaultImport = importDefault(dependencyMap[10]);
|
|
defaultImport.track(AnalyticEvents.PREMIUM_PROMOTION_OPENED, {location_page: binding.page,
|
|
location_section: binding.section});
|
|
defaultImport2 = importDefault(dependencyMap[11]);
|
|
pushLazy = defaultImport2.pushLazy;
|
|
value = require(dependencyMap[13]);
|
|
value = value(dependencyMap[12], dependencyMap.paths);
|
|
Reflect.apply(pushLazy, defaultImport2, [value, {analyticsLocation: binding,
|
|
analyticsLocations: analyticsLocationsBinding}]);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function _default_68108OnPress_68123() { // fn#68123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:6179, owner: _default_68108.onPress, offset: 0x01c3ffac, size: 65 bytes, params: 1, frame: 14
|
|
let value = environment.__proto__;
|
|
value = undefined;
|
|
GuildUtilsModule.handleJoinGuild(expressionSourceGuild == null ? value : expressionSourceGuild.id);
|
|
return value;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun68107, 8631, [31, 27, 6541, 3969, 1878, 661, 33, 4501, 697, 3802, 683, 5080, 7028, 1962, 4080, 8625,
|
|
566, 6771, 3800, 6545, 3777, 8533, 6796, 3829, 8632, 7007, 8626, 8633, 8635, 4573, 1244, 8629, 3857, 8637, 8638,
|
|
1305, 4578, 5475, 8640, 7972, 8641, 8645,
|
|
2]) /* metro module 8631, dependencies: [31, 27, 6541, 3969, 1878, 661, 33, 4501, 697, 3802, 683, 5080, 7028, 1962, 4080, 8625, 566, 6771, 3800, 6545, 3777, 8533, 6796, 3829, 8632, 7007, 8626, 8633, 8635, 4573, 1244, 8629, 3857, 8637, 8638, 1305, 4578, 5475, 8640, 7972, 8641, 8645, 2] */;
|