Andrey Shovkoplyas 2017-04-03 13:56:26 +03:00 committed by Roman Volosovskyi
parent ae000ec118
commit b1adf7aa68
1 changed files with 14 additions and 4 deletions

View File

@ -307,15 +307,25 @@
photo-path)} photo-path)}
:style st/photo}]]) :style st/photo}]])
(defview my-photo [from]
[account [:get-current-account]]
(let [{:keys [photo-path]} account]
[view st/photo-view
[image {:source {:uri (if (str/blank? photo-path)
(identicon from)
photo-path)}
:style st/photo}]]))
(defn message-body (defn message-body
[{:keys [last-outgoing? message-type same-author from index] :as message} content] [{:keys [last-outgoing? message-type same-author from index outgoing] :as message} content]
(let [delivery-status :seen-by-everyone] (let [delivery-status :seen-by-everyone]
[view st/group-message-wrapper [view st/group-message-wrapper
[view (st/message-body message) [view (st/message-body message)
[view st/message-author [view st/message-author
(when (and (or (= index 1) (not same-author)) (when (or (= index 1) (not same-author))
(not= from "me")) (if outgoing
[member-photo from])] [my-photo from]
[member-photo from]))]
[view (st/group-message-view message) [view (st/group-message-view message)
content content
(when last-outgoing? (when last-outgoing?