Show authout details in message preview of context drawer (#16765)
This commit is contained in:
parent
28f790b436
commit
15add24cd7
|
@ -30,12 +30,13 @@
|
||||||
(def delivery-state-showing-time-ms 3000)
|
(def delivery-state-showing-time-ms 3000)
|
||||||
|
|
||||||
(defn avatar-container
|
(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))
|
(if (or (and (seq (:response-to content))
|
||||||
quoted-message)
|
quoted-message)
|
||||||
last-in-group?
|
last-in-group?
|
||||||
pinned-by
|
pinned-by
|
||||||
(not show-reactions?))
|
(not show-reactions?)
|
||||||
|
show-user-info?)
|
||||||
[avatar/avatar from :small]
|
[avatar/avatar from :small]
|
||||||
[rn/view {:padding-top 2 :width 32}]))
|
[rn/view {:padding-top 2 :width 32}]))
|
||||||
|
|
||||||
|
@ -47,8 +48,13 @@
|
||||||
quoted-message
|
quoted-message
|
||||||
from
|
from
|
||||||
timestamp]}
|
timestamp]}
|
||||||
show-reactions?]
|
show-reactions?
|
||||||
(when (or (and (seq response-to) quoted-message) last-in-group? pinned-by (not 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])
|
(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])]
|
{:keys [ens-verified added?]} (rf/sub [:contacts/contact-by-address from])]
|
||||||
[quo/author
|
[quo/author
|
||||||
|
@ -84,7 +90,7 @@
|
||||||
(defn user-message-content
|
(defn user-message-content
|
||||||
[]
|
[]
|
||||||
(let [show-delivery-state? (reagent/atom false)]
|
(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
|
(let [{:keys [content-type quoted-message content
|
||||||
outgoing outgoing-status pinned-by]} message-data
|
outgoing outgoing-status pinned-by]} message-data
|
||||||
first-image (first (:album message-data))
|
first-image (first (:album message-data))
|
||||||
|
@ -129,7 +135,7 @@
|
||||||
[rn/view
|
[rn/view
|
||||||
{:style {:padding-horizontal 4
|
{:style {:padding-horizontal 4
|
||||||
:flex-direction :row}}
|
:flex-direction :row}}
|
||||||
[avatar-container message-data show-reactions?]
|
[avatar-container message-data show-reactions? show-user-info?]
|
||||||
(into
|
(into
|
||||||
(if show-reactions?
|
(if show-reactions?
|
||||||
[rn/view]
|
[rn/view]
|
||||||
|
@ -138,7 +144,7 @@
|
||||||
:flex 1
|
:flex 1
|
||||||
:max-height (when-not show-reactions?
|
:max-height (when-not show-reactions?
|
||||||
(* 0.4 height))}}
|
(* 0.4 height))}}
|
||||||
[author message-data show-reactions?]
|
[author message-data show-reactions? show-user-info?]
|
||||||
(case content-type
|
(case content-type
|
||||||
|
|
||||||
constants/content-type-text
|
constants/content-type-text
|
||||||
|
@ -184,7 +190,8 @@
|
||||||
{:message-data message-data
|
{:message-data message-data
|
||||||
:context context
|
:context context
|
||||||
:keyboard-shown? keyboard-shown?
|
:keyboard-shown? keyboard-shown?
|
||||||
:show-reactions? true}]])}]))
|
:show-reactions? true
|
||||||
|
:show-user-info? true}]])}]))
|
||||||
|
|
||||||
(defn message
|
(defn message
|
||||||
[{:keys [pinned-by mentioned content-type last-in-group? deleted? deleted-for-me?]
|
[{:keys [pinned-by mentioned content-type last-in-group? deleted? deleted-for-me?]
|
||||||
|
|
Loading…
Reference in New Issue