Chat commands fix
This commit is contained in:
parent
0d55009388
commit
4e932d9ae8
|
@ -206,8 +206,10 @@
|
||||||
chats
|
chats
|
||||||
(->> loaded-chats
|
(->> loaded-chats
|
||||||
(map (fn [{:keys [chat-id] :as chat}]
|
(map (fn [{:keys [chat-id] :as chat}]
|
||||||
(let [last-message (messages/get-last-message chat-id)]
|
(let [last-message (messages/get-last-message chat-id)
|
||||||
[chat-id (assoc chat :last-message last-message)])))
|
prev-chat (get chats chat-id)
|
||||||
|
new-chat (assoc chat :last-message last-message)]
|
||||||
|
[chat-id (merge prev-chat new-chat)])))
|
||||||
(into (priority-map-by compare-chats))))]
|
(into (priority-map-by compare-chats))))]
|
||||||
|
|
||||||
(-> db
|
(-> db
|
||||||
|
|
|
@ -177,7 +177,8 @@
|
||||||
show-emoji? [:chat-ui-props :show-emoji?]
|
show-emoji? [:chat-ui-props :show-emoji?]
|
||||||
layout-height [:get :layout-height]
|
layout-height [:get :layout-height]
|
||||||
input-text [:chat :input-text]]
|
input-text [:chat :input-text]]
|
||||||
{:component-did-mount #(dispatch [:check-autorun])
|
{:component-did-mount #(do (dispatch [:check-autorun])
|
||||||
|
(dispatch [:update-suggestions]))
|
||||||
:component-will-unmount #(dispatch [:set-chat-ui-props {:show-emoji? false}])}
|
:component-will-unmount #(dispatch [:set-chat-ui-props {:show-emoji? false}])}
|
||||||
[view {:style st/chat-view
|
[view {:style st/chat-view
|
||||||
:on-layout (fn [event]
|
:on-layout (fn [event]
|
||||||
|
|
Loading…
Reference in New Issue