fixed #675
This commit is contained in:
parent
dc38ba94c6
commit
556b9beec7
|
@ -155,11 +155,13 @@
|
||||||
(let [accounts (->> (accounts-store/get-all)
|
(let [accounts (->> (accounts-store/get-all)
|
||||||
(map (fn [{:keys [address] :as account}]
|
(map (fn [{:keys [address] :as account}]
|
||||||
[address account]))
|
[address account]))
|
||||||
(into {}))]
|
(into {}))
|
||||||
(assoc db :accounts accounts
|
view (if (empty? accounts)
|
||||||
:view-id (if (empty? accounts)
|
|
||||||
:chat
|
:chat
|
||||||
:accounts))))
|
:accounts)]
|
||||||
|
(assoc db :accounts accounts
|
||||||
|
:view-id view
|
||||||
|
:navigation-stack (list view))))
|
||||||
|
|
||||||
(register-handler :load-accounts load-accounts!)
|
(register-handler :load-accounts load-accounts!)
|
||||||
|
|
||||||
|
|
|
@ -39,8 +39,6 @@
|
||||||
|
|
||||||
(defn create-account [_]
|
(defn create-account [_]
|
||||||
(dispatch-sync [:reset-app])
|
(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]))
|
(dispatch [:navigate-to :chat console-chat-id]))
|
||||||
|
|
||||||
(defview accounts []
|
(defview accounts []
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
[status-im.accounts.styles :as st]))
|
[status-im.accounts.styles :as st]))
|
||||||
|
|
||||||
(defn on-press [address]
|
(defn on-press [address]
|
||||||
(dispatch [:navigate-to-clean :accounts])
|
|
||||||
(dispatch [:navigate-to :login address])
|
(dispatch [:navigate-to :login address])
|
||||||
(dispatch [:set-in [:login :address] address]))
|
(dispatch [:set-in [:login :address] address]))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue