From 15add24cd7bbc87a06530d85c94937e12578ee5b Mon Sep 17 00:00:00 2001 From: Alexander Date: Tue, 25 Jul 2023 15:34:32 +0200 Subject: [PATCH] Show authout details in message preview of context drawer (#16765) --- .../contexts/chat/messages/content/view.cljs | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/src/status_im2/contexts/chat/messages/content/view.cljs b/src/status_im2/contexts/chat/messages/content/view.cljs index 48113a1976..c1349add03 100644 --- a/src/status_im2/contexts/chat/messages/content/view.cljs +++ b/src/status_im2/contexts/chat/messages/content/view.cljs @@ -30,12 +30,13 @@ (def delivery-state-showing-time-ms 3000) (defn avatar-container - [{:keys [content last-in-group? pinned-by quoted-message from]} show-reactions?] + [{:keys [content last-in-group? pinned-by quoted-message from]} show-reactions? show-user-info?] (if (or (and (seq (:response-to content)) quoted-message) last-in-group? pinned-by - (not show-reactions?)) + (not show-reactions?) + show-user-info?) [avatar/avatar from :small] [rn/view {:padding-top 2 :width 32}])) @@ -47,8 +48,13 @@ quoted-message from timestamp]} - show-reactions?] - (when (or (and (seq response-to) quoted-message) last-in-group? pinned-by (not show-reactions?)) + show-reactions? + show-user-info?] + (when (or (and (seq response-to) quoted-message) + last-in-group? + pinned-by + (not show-reactions?) + show-user-info?) (let [[primary-name secondary-name] (rf/sub [:contacts/contact-two-names-by-identity from]) {:keys [ens-verified added?]} (rf/sub [:contacts/contact-by-address from])] [quo/author @@ -84,7 +90,7 @@ (defn user-message-content [] (let [show-delivery-state? (reagent/atom false)] - (fn [{:keys [message-data context keyboard-shown? show-reactions?]}] + (fn [{:keys [message-data context keyboard-shown? show-reactions? show-user-info?]}] (let [{:keys [content-type quoted-message content outgoing outgoing-status pinned-by]} message-data first-image (first (:album message-data)) @@ -129,7 +135,7 @@ [rn/view {:style {:padding-horizontal 4 :flex-direction :row}} - [avatar-container message-data show-reactions?] + [avatar-container message-data show-reactions? show-user-info?] (into (if show-reactions? [rn/view] @@ -138,7 +144,7 @@ :flex 1 :max-height (when-not show-reactions? (* 0.4 height))}} - [author message-data show-reactions?] + [author message-data show-reactions? show-user-info?] (case content-type constants/content-type-text @@ -184,7 +190,8 @@ {:message-data message-data :context context :keyboard-shown? keyboard-shown? - :show-reactions? true}]])}])) + :show-reactions? true + :show-user-info? true}]])}])) (defn message [{:keys [pinned-by mentioned content-type last-in-group? deleted? deleted-for-me?]