Fix message key so that message status updates work
This commit is contained in:
parent
9136dd0d3f
commit
400e8b6d99
|
@ -27,6 +27,7 @@
|
||||||
:as current-chat}]
|
:as current-chat}]
|
||||||
(views/letsubs [chat-name [:get-current-chat-name]
|
(views/letsubs [chat-name [:get-current-chat-name]
|
||||||
{:keys [pending? whisper-identity photo-path]} [:get-current-chat-contact]]
|
{:keys [pending? whisper-identity photo-path]} [:get-current-chat-contact]]
|
||||||
|
[react/view
|
||||||
[react/view {:style styles/toolbar-chat-view}
|
[react/view {:style styles/toolbar-chat-view}
|
||||||
[react/view {:style {:flex-direction :row
|
[react/view {:style {:flex-direction :row
|
||||||
:flex 1}}
|
:flex 1}}
|
||||||
|
@ -59,7 +60,7 @@
|
||||||
[react/text {:style (styles/profile-actions-text colors/black)
|
[react/text {:style (styles/profile-actions-text colors/black)
|
||||||
:on-press #(re-frame/dispatch [:chat.ui/delete-chat-pressed chat-id])}
|
:on-press #(re-frame/dispatch [:chat.ui/delete-chat-pressed chat-id])}
|
||||||
(i18n/label :t/delete-chat)]]]
|
(i18n/label :t/delete-chat)]]]
|
||||||
[connectivity/error-view {:top 2}]))
|
[connectivity/error-view {:top 2}]]))
|
||||||
|
|
||||||
(views/defview message-author-name [{:keys [outgoing from] :as message}]
|
(views/defview message-author-name [{:keys [outgoing from] :as message}]
|
||||||
(views/letsubs [current-account [:get-current-account]
|
(views/letsubs [current-account [:get-current-account]
|
||||||
|
@ -170,7 +171,7 @@
|
||||||
[react/view
|
[react/view
|
||||||
(doall
|
(doall
|
||||||
(for [[index {:keys [from content message-id type value] :as message-obj}] (map-indexed vector (reverse messages))]
|
(for [[index {:keys [from content message-id type value] :as message-obj}] (map-indexed vector (reverse messages))]
|
||||||
^{:key (or message-id (str type value))}
|
^{:key message-obj}
|
||||||
[message content (= from current-public-key)
|
[message content (= from current-public-key)
|
||||||
(assoc message-obj :group-chat group-chat
|
(assoc message-obj :group-chat group-chat
|
||||||
:current-public-key current-public-key)]))]]])))
|
:current-public-key current-public-key)]))]]])))
|
||||||
|
|
Loading…
Reference in New Issue