From e3fe6d48da54ce93958df5b8079fd59f7bba9099 Mon Sep 17 00:00:00 2001 From: janherich Date: Thu, 22 Feb 2018 17:23:15 +0100 Subject: [PATCH] Properly open/navigate-to chat --- src/status_im/ui/screens/profile/events.cljs | 6 ------ src/status_im/ui/screens/profile/views.cljs | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/status_im/ui/screens/profile/events.cljs b/src/status_im/ui/screens/profile/events.cljs index 52e01ba74f..0fc724a74e 100644 --- a/src/status_im/ui/screens/profile/events.cljs +++ b/src/status_im/ui/screens/profile/events.cljs @@ -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])) diff --git a/src/status_im/ui/screens/profile/views.cljs b/src/status_im/ui/screens/profile/views.cljs index 46eb40c7a6..7f113dd9bc 100644 --- a/src/status_im/ui/screens/profile/views.cljs +++ b/src/status_im/ui/screens/profile/views.cljs @@ -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]