fix ids for chats created after receiving from unknown id

This commit is contained in:
Roman Volosovskyi 2016-05-30 11:49:16 +03:00
parent 32b10794d2
commit b914493283
2 changed files with 7 additions and 6 deletions

View File

@ -36,7 +36,7 @@
[drawer-view
[view st/chats-container
[chats-list-toolbar]
[list-view {:dataSource (to-datasource (vals @chats))
[list-view {:dataSource (to-datasource @chats)
:renderRow (fn [row _ _]
(list-item [chat-list-item row]))
:style st/list-container}]

View File

@ -8,10 +8,11 @@
[status-im.chats-list.views.inner-item :refer
[chat-list-item-inner-view]]))
(defn chat-list-item [{:keys [chat-id] :as chat}]
(defn chat-list-item [[chat-id chat]]
[touchable-highlight
{:on-press #(dispatch [:navigate-to :chat chat-id])}
[view [chat-list-item-inner-view (merge chat
;; TODO stub data
{:new-messages-count 3
{:chat-id chat-id
:new-messages-count 3
:online true})]]])