[#14728] Fix sender avatar in reply

This commit is contained in:
Roman Volosovskyi 2023-01-23 14:01:49 +01:00
parent bd3c724c66
commit df2dd56cfb
No known key found for this signature in database
GPG Key ID: 0238A4B5ECEE70DE
1 changed files with 5 additions and 2 deletions

View File

@ -20,10 +20,13 @@
[status-im.utils.utils :as utils])) [status-im.utils.utils :as utils]))
(defn avatar (defn avatar
[{:keys [response-to last-in-group? pinned quoted-message from]}] [{:keys [content last-in-group? pinned quoted-message from]}]
[rn/touchable-without-feedback {:on-press #(rf/dispatch [:chat.ui/show-profile from])} [rn/touchable-without-feedback {:on-press #(rf/dispatch [:chat.ui/show-profile from])}
[rn/view {:padding-top 2 :width 32} [rn/view {:padding-top 2 :width 32}
(when (or (and (seq response-to) quoted-message) last-in-group? pinned) (when (or (and (seq (:response-to content))
quoted-message)
last-in-group?
pinned)
(let [display-name (first (rf/sub [:contacts/contact-two-names-by-identity from])) (let [display-name (first (rf/sub [:contacts/contact-two-names-by-identity from]))
contact (rf/sub [:contacts/contact-by-address from]) contact (rf/sub [:contacts/contact-by-address from])
photo-path (when-not (empty? (:images contact)) (rf/sub [:chats/photo-path from])) photo-path (when-not (empty? (:images contact)) (rf/sub [:chats/photo-path from]))