Skip to content

Commit

Permalink
fix: contact avatars in jump to
Browse files Browse the repository at this point in the history
  • Loading branch information
yqrashawn committed Jul 3, 2023
1 parent c02f3ce commit b4e8751
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions src/status_im2/subs/shell.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,11 @@
:counter-label (:unviewed-mentions-count chat)})))

(defn one-to-one-chat-card
[contact names chat id communities]
(let [images (:images contact)
profile-picture (:uri (or (:thumbnail images) (:large images) (first images)))]
{:title (first names)
:avatar-params {:full-name (last names)
:profile-picture (when profile-picture
(str profile-picture "&addRing=0"))}
[contact names profile-picture chat id communities]
(let [display-name (first names)]
{:title display-name
:avatar-params {:full-name display-name
:profile-picture profile-picture}
:customization-color (or (:customization-color contact) :primary)
:content (get-card-content
{:chat chat
Expand Down Expand Up @@ -143,10 +141,16 @@
(fn [[_ id] _]
[(re-frame/subscribe [:contacts/contact-by-identity id])
(re-frame/subscribe [:contacts/contact-two-names-by-identity id])
(re-frame/subscribe [:chats/photo-path id])
(re-frame/subscribe [:chats/chat id])
(re-frame/subscribe [:communities])])
(fn [[contact names chat communities] [_ id]]
(one-to-one-chat-card contact names chat id communities)))
(fn [[contact names profile-picture chat communities] [_ id]]
(one-to-one-chat-card contact
names
profile-picture
chat
id
communities)))

(re-frame/reg-sub
:shell/private-group-chat-card
Expand Down

0 comments on commit b4e8751

Please sign in to comment.