From d9aa885eb2b3912ee86d23d9e49b2bba2a4f7d2b Mon Sep 17 00:00:00 2001 From: codemaster <39961806+codemaster115@users.noreply.github.com> Date: Mon, 29 Apr 2024 06:00:19 -0700 Subject: [PATCH] fix: reaction drawer issue (#19754) --- .../messenger/messages/content/style.cljs | 20 ++++++++++--------- .../chat/messenger/messages/content/view.cljs | 16 +++++++++------ 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/src/status_im/contexts/chat/messenger/messages/content/style.cljs b/src/status_im/contexts/chat/messenger/messages/content/style.cljs index 12db458956..11ad5f9173 100644 --- a/src/status_im/contexts/chat/messenger/messages/content/style.cljs +++ b/src/status_im/contexts/chat/messenger/messages/content/style.cljs @@ -16,16 +16,18 @@ (assoc :margin-top 4))) (defn user-message-content - [{:keys [outgoing outgoing-status six-reactions? window-scale small-screen?]}] + [{:keys [outgoing outgoing-status six-reactions? window-scale small-screen? preview?]}] {:border-radius 16 - :padding-horizontal 8 - :padding-top 4 - :padding-bottom (if (or small-screen? - (and - (> 3 window-scale) - six-reactions?)) - (* message-padding-scaling-ratio window-scale) - 4) + :padding-horizontal (if preview? 12 8) + :padding-top (if preview? 8 4) + :padding-bottom (if preview? + 12 + (if (or small-screen? + (and + (> 3 window-scale) + six-reactions?)) + (* message-padding-scaling-ratio window-scale) + 4)) :opacity (if (and outgoing (= outgoing-status :sending)) 0.5 1)}) diff --git a/src/status_im/contexts/chat/messenger/messages/content/view.cljs b/src/status_im/contexts/chat/messenger/messages/content/view.cljs index d937dbecb3..811c6851a8 100644 --- a/src/status_im/contexts/chat/messenger/messages/content/view.cljs +++ b/src/status_im/contexts/chat/messenger/messages/content/view.cljs @@ -196,7 +196,8 @@ :outgoing-status outgoing-status :small-screen? rn/small-screen? :window-scale window-scale - :six-reactions? six-reactions?}) + :six-reactions? six-reactions? + :preview? preview?}) :on-press (fn [] (if (and platform/ios? keyboard-shown?) (do @@ -226,6 +227,7 @@ [gesture/scroll-view]) [{:style {:margin-left 8 :flex 1 + :gap 1 :max-height (when-not show-reactions? (* 0.4 height))}} [author message-data show-reactions? in-reaction-and-action-menu? show-user-info?] @@ -264,11 +266,13 @@ [reactions/message-reactions-row (assoc message-data :preview? preview?) [rn/view {:pointer-events :none} [user-message-content - {:theme theme - :message-data message-data - :context context - :keyboard-shown? keyboard-shown? - :show-reactions? false}]]])]])))) + {:theme theme + :message-data message-data + :context context + :in-reaction-and-action-menu? true + :keyboard-shown? keyboard-shown? + :preview? true + :show-reactions? true}]]])]])))) (defn on-long-press [{:keys [deleted? deleted-for-me?] :as message-data} context keyboard-shown?]