From 2e3844c7b428d6479246f4d51993679f0e5cb33f Mon Sep 17 00:00:00 2001
From: Hailey <me@haileyok.com>
Date: Mon, 28 Oct 2024 11:07:22 -0700
Subject: Don't render `ComposerPills` when unnecessary (#5975)

---
 src/view/com/composer/Composer.tsx | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'src/view/com/composer/Composer.tsx')

diff --git a/src/view/com/composer/Composer.tsx b/src/view/com/composer/Composer.tsx
index 5750e7f18..efebd65fe 100644
--- a/src/view/com/composer/Composer.tsx
+++ b/src/view/com/composer/Composer.tsx
@@ -872,6 +872,12 @@ function ComposerPills({
   const media = draft.embed.media
   const hasMedia = media?.type === 'images' || media?.type === 'video'
   const hasLink = !!draft.embed.link
+
+  // Don't render anything if no pills are going to be displayed
+  if (isReply && !hasMedia && !hasLink) {
+    return null
+  }
+
   return (
     <Animated.View
       style={[a.flex_row, a.p_sm, t.atoms.bg, bottomBarAnimatedStyle]}>
-- 
cgit 1.4.1

