This commit is contained in:
Roman Volosovskyi 2017-01-02 11:47:57 +02:00
parent b93cc4669e
commit 5d405e8e51
1 changed files with 6 additions and 3 deletions

View File

@ -168,9 +168,12 @@
(register-handler :set-chat-input-text (register-handler :set-chat-input-text
(u/side-effect! (u/side-effect!
(fn [{:keys [current-chat-id]} [_ text]] (fn [{:keys [current-chat-id]} [_ text]]
(if (console? current-chat-id) ;; fixes https://github.com/status-im/status-react/issues/594
(dispatch [::check-input-for-commands text]) ;; todo: revisit with more clever solution
(dispatch [::check-suggestions current-chat-id text]))))) (let [text' (if (= text "! ") "!" text)]
(if (console? current-chat-id)
(dispatch [::check-input-for-commands text'])
(dispatch [::check-suggestions current-chat-id text']))))))
(register-handler :add-to-chat-input-text (register-handler :add-to-chat-input-text
(u/side-effect! (u/side-effect!