Merge pull request #380 from status-im/bug/#378

User icons in group chat (#378)

Former-commit-id: 2584b40dae
This commit is contained in:
Roman Volosovskyi 2016-10-21 15:20:06 +03:00 committed by GitHub
commit 03121cb774
2 changed files with 4 additions and 2 deletions

View File

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

View File

@ -225,7 +225,7 @@
:style st/photo}]])
(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]
[view st/group-message-wrapper
(when selected
@ -234,7 +234,8 @@
"Mar 7th, 15:22"])
[view (st/incoming-group-message-body-st message)
[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
content
;; TODO show for last or selected