From 5bf8cebb83a225a2c6f9bc93ca0d6ab6f3064397 Mon Sep 17 00:00:00 2001 From: Roman Volosovskyi Date: Mon, 21 Nov 2016 12:01:01 +0200 Subject: [PATCH] fix #471 --- src/status_im/chat/handlers.cljs | 6 +++++- src/status_im/db.cljs | 3 ++- src/status_im/handlers.cljs | 3 ++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/status_im/chat/handlers.cljs b/src/status_im/chat/handlers.cljs index 98985cae32..d7d1f14046 100644 --- a/src/status_im/chat/handlers.cljs +++ b/src/status_im/chat/handlers.cljs @@ -318,7 +318,11 @@ [{:keys [current-chat-id] :as db} [_ _ id]] (let [chat-id (or id current-chat-id) messages (get-in db [:chats chat-id :messages]) - db' (assoc db :current-chat-id chat-id) + command? (= :command (get-in db [:edit-mode chat-id])) + db' (-> db + (assoc :current-chat-id chat-id) + (update-in [:animations :to-response-height chat-id] + #(if command? % 0))) commands-loaded? (if js/goog.DEBUG false (get-in db [:chats chat-id :commands-loaded]))] diff --git a/src/status_im/db.cljs b/src/status_im/db.cljs index 0fc4e534dd..dd6ce7595c 100644 --- a/src/status_im/db.cljs +++ b/src/status_im/db.cljs @@ -45,7 +45,8 @@ :sync-state :done :sync-listener nil - :status-module-initialized? js/goog.DEBUG}) + :status-module-initialized? js/goog.DEBUG + :edit-mode {}}) (defn chat-staged-commands-path [chat-id] [:chats chat-id :staged-commands]) diff --git a/src/status_im/handlers.cljs b/src/status_im/handlers.cljs index dd91ed2741..5afb55d51f 100644 --- a/src/status_im/handlers.cljs +++ b/src/status_im/handlers.cljs @@ -51,7 +51,8 @@ (register-handler :initialize-account-db (fn [db _] - (assoc db :current-chat-id console-chat-id))) + (assoc db :current-chat-id console-chat-id + :edit-mode nil))) (register-handler :initialize-account (u/side-effect!