Andrey Shovkoplyas 2017-01-20 11:27:29 +03:00 committed by Roman Volosovskyi
parent dc38ba94c6
commit 556b9beec7
3 changed files with 6 additions and 7 deletions

View File

@ -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!)

View File

@ -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 []

View File

@ -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]))