Properly open/navigate-to chat

This commit is contained in:
janherich 2018-02-22 17:23:15 +01:00 committed by Roman Volosovskyi
parent 8d9675154c
commit e3fe6d48da
No known key found for this signature in database
GPG Key ID: 154EBFAC70C8CC3E
2 changed files with 1 additions and 7 deletions

View File

@ -39,12 +39,6 @@
(as-> fx
(merge fx (input-events/select-chat-input-command (:db fx) send-command nil true)))))))
(handlers/register-handler-fx
:profile/send-message
(fn [_ [_ identity]]
(when identity
{:dispatch [:navigation-replace :chat identity]})))
(defn get-current-account [{:keys [:accounts/current-account-id] :as db}]
(get-in db [:accounts/accounts current-account-id]))

View File

@ -116,7 +116,7 @@
[action-button/action-button {:label (i18n/label :t/start-conversation)
:icon :icons/chats
:icon-opts {:color :blue}
:on-press #(re-frame/dispatch [:profile/send-message whisper-identity])}]
:on-press #(re-frame/dispatch [:start-chat whisper-identity {:navigation-replace? true}])}]
(when-not dapp?
[react/view
[action-button/action-separator]