User icons in group chat (#378)

This commit is contained in:
Alexander Pantyuhov 2016-10-21 13:55:12 +03:00
parent 18452c9bd9
commit 5c56ed94bf
2 changed files with 4 additions and 2 deletions

View File

@ -80,6 +80,7 @@
(add-message-color contact-by-identity) (add-message-color contact-by-identity)
(assoc :group-chat group-chat) (assoc :group-chat group-chat)
(assoc :messages-count messages-count) (assoc :messages-count messages-count)
(assoc :index index)
(assoc :last-message (= (js/parseInt index) (dec messages-count))))] (assoc :last-message (= (js/parseInt index) (dec messages-count))))]
(list-item [chat-message message]))) (list-item [chat-message message])))

View File

@ -225,7 +225,7 @@
:style st/photo}]]) :style st/photo}]])
(defn incoming-group-message-body (defn incoming-group-message-body
[{:keys [selected same-author from] :as message} content] [{:keys [selected same-author from index] :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
(when selected (when selected
@ -234,7 +234,8 @@
"Mar 7th, 15:22"]) "Mar 7th, 15:22"])
[view (st/incoming-group-message-body-st message) [view (st/incoming-group-message-body-st message)
[view st/message-author [view st/message-author
(when (not same-author) [member-photo from])] (when (or (= index 1)
(not same-author)) [member-photo from])]
[view st/group-message-view [view st/group-message-view
content content
;; TODO show for last or selected ;; TODO show for last or selected