Clear :last-message when clearing chat history. Fixes #212
This commit is contained in:
parent
016fe90abe
commit
fc7cc1d795
|
@ -56,7 +56,9 @@
|
||||||
|
|
||||||
(defn clear-messages
|
(defn clear-messages
|
||||||
[{:keys [current-chat-id] :as db} _]
|
[{:keys [current-chat-id] :as db} _]
|
||||||
(assoc-in db [:chats current-chat-id :messages] '()))
|
(-> db
|
||||||
|
(assoc-in [:chats current-chat-id :messages] '())
|
||||||
|
(assoc-in [:chats current-chat-id :last-message] nil)))
|
||||||
|
|
||||||
(register-handler :clear-history
|
(register-handler :clear-history
|
||||||
(after delete-messages!)
|
(after delete-messages!)
|
||||||
|
|
Loading…
Reference in New Issue