This commit is contained in:
Roman Volosovskyi 2016-12-01 17:32:11 +02:00
parent 14477b4921
commit 0916cc6119
2 changed files with 9 additions and 3 deletions

View File

@ -273,7 +273,9 @@
(defn init-chat (defn init-chat
([db] (init-chat db nil)) ([db] (init-chat db nil))
([{:keys [messages current-chat-id] :as db} _] ([{:keys [messages current-chat-id] :as db} _]
(assoc-in db [:chats current-chat-id :messages] messages))) (-> db
(assoc-in [:chats current-chat-id :messages] messages)
(dissoc :messages))))
(defn load-commands! (defn load-commands!
[{:keys [current-chat-id]}] [{:keys [current-chat-id]}]

View File

@ -56,8 +56,12 @@
(register-handler :initialize-account-db (register-handler :initialize-account-db
(fn [db _] (fn [db _]
(assoc db :current-chat-id console-chat-id (-> db
:edit-mode nil))) (assoc :current-chat-id console-chat-id)
(dissoc :edit-mode
:transactions
:transactions-queue
:new-contact-identity))))
(register-handler :initialize-account (register-handler :initialize-account
(u/side-effect! (u/side-effect!