73 lines
4.0 KiB
TypeScript
73 lines
4.0 KiB
TypeScript
/* Metro module 8852; source: modules/activity_status/native/ActivityEmoji.tsx; dependencies: [31, 33, 4501, 3829, 1423, 7950, 6739, 2] */
|
|
function _fun69030(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9037:6, offset: 0x01c65a84, size: 207 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importAll(31) /* metro dependency 31 */;
|
|
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
|
|
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({emoji: {'flexShrink': 0,
|
|
'width': '100%', 'height': '100%'}, text: {'textAlign': 'center', 'fontFamily': 'System'}});
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activity_status/native/ActivityEmoji.tsx');
|
|
exports.default = ActivityEmoji;
|
|
}
|
|
|
|
function ActivityEmoji({emoji, size, style, withPlaceholder, animate}) { // fn#69031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9037:332, offset: 0x01c65b53, size: 401 bytes, params: 2, frame: 23
|
|
var r1;
|
|
var r0;
|
|
var defaultImport;
|
|
withPlaceholder = !(withPlaceholder === undefined) && withPlaceholder;
|
|
animate = animate === undefined || animate;
|
|
const styles = useStyles();
|
|
const AnimateEmoji = (require(3829) /* metro dependency 3829: UserSettings */).AnimateEmoji;
|
|
const value5 = AnimateEmoji.useSetting();
|
|
const Boolean = global.Boolean;
|
|
const value8 = env0_3.useMemo(_fun69032, [emoji?.id, Boolean(emoji?.animated && value5 && animate)]);
|
|
if (emoji != null) {
|
|
if (emoji == null) {
|
|
const ReactionIcon = (require(7950) /* metro dependency 7950: ReactionIcon */).ReactionIcon;
|
|
r1 = <ReactionIcon style={style} size="sm" />;
|
|
} else {
|
|
defaultImport = importDefault(6739) /* metro dependency 6739: Emoji */;
|
|
var defaultImportProps2 = {src: value8, name: emoji.name, style: [style, {width: size, height: size}]};
|
|
emoji = styles.emoji;
|
|
defaultImportProps2.textEmojiStyle = [emoji, styles.text, {fontSize: size}];
|
|
emoji = styles.emoji;
|
|
defaultImportProps2.fastImageStyle = emoji;
|
|
defaultImportProps2.adjustsFontSizeToFit = true;
|
|
r1 = ((Component) => <Component {...defaultImportProps2} />)(defaultImport);
|
|
}
|
|
r0 = r1;
|
|
} else if (withPlaceholder) {
|
|
if (emoji == null) {
|
|
const ReactionIcon2 = (require(7950) /* metro dependency 7950: ReactionIcon */).ReactionIcon;
|
|
r1 = <ReactionIcon2 style={style} size="sm" />;
|
|
} else {
|
|
defaultImport = importDefault(6739) /* metro dependency 6739: Emoji */;
|
|
var defaultImportProps2 = {src: value8, name: emoji.name, style: [style, {width: size, height: size}]};
|
|
emoji = styles.emoji;
|
|
defaultImportProps2.textEmojiStyle = [emoji, styles.text, {fontSize: size}];
|
|
emoji = styles.emoji;
|
|
defaultImportProps2.fastImageStyle = emoji;
|
|
defaultImportProps2.adjustsFontSizeToFit = true;
|
|
r1 = ((Component) => <Component {...defaultImportProps2} />)(defaultImport);
|
|
}
|
|
r0 = r1;
|
|
} else {
|
|
r0 = null;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function _fun69032() { // fn#69032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9037:519, offset: 0x01c65ce4, size: 102 bytes, params: 1, frame: 13
|
|
var value3;
|
|
const emojiBinding = emoji;
|
|
const value2 = undefined;
|
|
if ((emojiBinding == null ? value2 : emoji.id) != null) {
|
|
value3 = environment.__proto__;
|
|
return (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getEmojiURL({id: emoji.id, size: 48,
|
|
animated: env0_1});
|
|
}
|
|
return value2;
|
|
}
|
|
|