From 556b9beec7e44821698448e74c14ac3d51a342e7 Mon Sep 17 00:00:00 2001 From: Andrey Shovkoplyas Date: Fri, 20 Jan 2017 11:27:29 +0300 Subject: [PATCH] https://github.com/status-im/status-react/issues/675 fixed #675 --- src/status_im/accounts/handlers.cljs | 10 ++++++---- src/status_im/accounts/screen.cljs | 2 -- src/status_im/accounts/views/account.cljs | 1 - 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/status_im/accounts/handlers.cljs b/src/status_im/accounts/handlers.cljs index 6b5bfbbdce..40330e5c48 100644 --- a/src/status_im/accounts/handlers.cljs +++ b/src/status_im/accounts/handlers.cljs @@ -155,11 +155,13 @@ (let [accounts (->> (accounts-store/get-all) (map (fn [{:keys [address] :as account}] [address account])) - (into {}))] + (into {})) + view (if (empty? accounts) + :chat + :accounts)] (assoc db :accounts accounts - :view-id (if (empty? accounts) - :chat - :accounts)))) + :view-id view + :navigation-stack (list view)))) (register-handler :load-accounts load-accounts!) diff --git a/src/status_im/accounts/screen.cljs b/src/status_im/accounts/screen.cljs index bf765d262a..8bcac849e2 100644 --- a/src/status_im/accounts/screen.cljs +++ b/src/status_im/accounts/screen.cljs @@ -39,8 +39,6 @@ (defn create-account [_] (dispatch-sync [:reset-app]) - ; add accounts screen to history ( maybe there is a better way ? ) - (dispatch [:navigate-to-clean :accounts]) (dispatch [:navigate-to :chat console-chat-id])) (defview accounts [] diff --git a/src/status_im/accounts/views/account.cljs b/src/status_im/accounts/views/account.cljs index fab60bff61..cc836c3fd7 100644 --- a/src/status_im/accounts/views/account.cljs +++ b/src/status_im/accounts/views/account.cljs @@ -11,7 +11,6 @@ [status-im.accounts.styles :as st])) (defn on-press [address] - (dispatch [:navigate-to-clean :accounts]) (dispatch [:navigate-to :login address]) (dispatch [:set-in [:login :address] address]))