about summary refs log tree commit diff
path: root/src/components/dms/MessageItem.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/dms/MessageItem.tsx')
-rw-r--r--src/components/dms/MessageItem.tsx44
1 files changed, 23 insertions, 21 deletions
diff --git a/src/components/dms/MessageItem.tsx b/src/components/dms/MessageItem.tsx
index 772fcb1b1..61358c989 100644
--- a/src/components/dms/MessageItem.tsx
+++ b/src/components/dms/MessageItem.tsx
@@ -21,7 +21,7 @@ import {atoms as a, useTheme} from '#/alf'
 import {ActionsWrapper} from '#/components/dms/ActionsWrapper'
 import {InlineLinkText} from '#/components/Link'
 import {Text} from '#/components/Typography'
-import {RichText} from '../RichText'
+import {isOnlyEmoji, RichText} from '../RichText'
 import {MessageItemEmbed} from './MessageItemEmbed'
 
 let MessageItem = ({
@@ -87,36 +87,38 @@ let MessageItem = ({
         )}
         {rt.text.length > 0 && (
           <View
-            style={[
-              a.py_sm,
-              a.my_2xs,
-              a.rounded_md,
-              {
-                paddingLeft: 14,
-                paddingRight: 14,
-                backgroundColor: isFromSelf
-                  ? isPending
-                    ? pendingColor
-                    : t.palette.primary_500
-                  : t.palette.contrast_50,
-                borderRadius: 17,
-              },
-              isFromSelf ? a.self_end : a.self_start,
-              isFromSelf
-                ? {borderBottomRightRadius: isLastInGroup ? 2 : 17}
-                : {borderBottomLeftRadius: isLastInGroup ? 2 : 17},
-            ]}>
+            style={
+              !isOnlyEmoji(message.text) && [
+                a.py_sm,
+                a.my_2xs,
+                a.rounded_md,
+                {
+                  paddingLeft: 14,
+                  paddingRight: 14,
+                  backgroundColor: isFromSelf
+                    ? isPending
+                      ? pendingColor
+                      : t.palette.primary_500
+                    : t.palette.contrast_50,
+                  borderRadius: 17,
+                },
+                isFromSelf ? a.self_end : a.self_start,
+                isFromSelf
+                  ? {borderBottomRightRadius: isLastInGroup ? 2 : 17}
+                  : {borderBottomLeftRadius: isLastInGroup ? 2 : 17},
+              ]
+            }>
             <RichText
               value={rt}
               style={[
                 a.text_md,
-                a.leading_snug,
                 isFromSelf && {color: t.palette.white},
                 isPending &&
                   t.name !== 'light' && {color: t.palette.primary_300},
               ]}
               interactiveStyle={a.underline}
               enableTags
+              emojiMultiplier={3}
             />
           </View>
         )}