From 40ec6ec47eefffd790d36716bfe9cd876eab0efc Mon Sep 17 00:00:00 2001 From: Roman Volosovskyi Date: Wed, 18 Jul 2018 13:14:24 +0300 Subject: [PATCH] [#5211] show welcome screen after account creation Signed-off-by: Igor Mandrigin --- src/status_im/ui/screens/accounts/events.cljs | 12 +++--------- .../ui/screens/accounts/recover/events.cljs | 5 +++-- src/status_im/ui/screens/db.cljs | 3 --- src/status_im/ui/screens/events.cljs | 3 +-- 4 files changed, 7 insertions(+), 16 deletions(-) diff --git a/src/status_im/ui/screens/accounts/events.cljs b/src/status_im/ui/screens/accounts/events.cljs index 2da7f4c81b..a1d4fd205a 100644 --- a/src/status_im/ui/screens/accounts/events.cljs +++ b/src/status_im/ui/screens/accounts/events.cljs @@ -112,17 +112,11 @@ :account-set-name (fn [{{:accounts/keys [create] :as db} :db :as cofx} _] (handlers-macro/merge-fx cofx - {:db db - :dispatch [:navigate-to-clean :home]} + {:db (assoc db :accounts/create {:show-welcome? true}) + :dispatch-n [[:navigate-to-clean :home] + [:request-notifications]]} (accounts.utils/account-update {:name (:name create)})))) -(handlers/register-handler-fx - :account-finalized - (fn [{db :db} [_ show-welcome?]] - {:db (assoc db :accounts/create {:show-welcome? show-welcome?}) - :dispatch-n [[:navigate-to-clean :home] - [:request-notifications]]})) - (handlers/register-handler-fx :account-set-input-text (fn [{db :db} [_ input-key text]] diff --git a/src/status_im/ui/screens/accounts/recover/events.cljs b/src/status_im/ui/screens/accounts/recover/events.cljs index c7b445c749..549c897e46 100644 --- a/src/status_im/ui/screens/accounts/recover/events.cljs +++ b/src/status_im/ui/screens/accounts/recover/events.cljs @@ -59,8 +59,9 @@ (handlers/register-handler-fx :account-recovered-navigate (fn [{:keys [db]}] - {:db (assoc-in db [:accounts/recover :processing] false) - :dispatch [:navigate-to-clean :home]})) + {:db (assoc-in db [:accounts/recover :processing] false) + :dispatch-n [[:navigate-to-clean :home] + [:request-notifications]]})) (handlers/register-handler-fx :recover-account diff --git a/src/status_im/ui/screens/db.cljs b/src/status_im/ui/screens/db.cljs index 17419bf83b..2e092617f4 100644 --- a/src/status_im/ui/screens/db.cljs +++ b/src/status_im/ui/screens/db.cljs @@ -114,8 +114,6 @@ (spec/def :navigation.screen-params.dapp-description/dapp :new/open-dapp) (spec/def :navigation.screen-params/dapp-description map?) -(spec/def :navigation.screen-params/usage-data vector?) - (spec/def :navigation.screen-params/collectibles-list map?) (spec/def :navigation/screen-params (spec/nilable (allowed-keys :opt-un [:navigation.screen-params/network-details @@ -125,7 +123,6 @@ :navigation.screen-params/group-contacts :navigation.screen-params/edit-contact-group :navigation.screen-params/dapp-description - :navigation.screen-params/usage-data :navigation.screen-params/collectibles-list]))) (spec/def :desktop/desktop (spec/nilable any?)) diff --git a/src/status_im/ui/screens/events.cljs b/src/status_im/ui/screens/events.cljs index cf911a7c36..fb7db77fdd 100644 --- a/src/status_im/ui/screens/events.cljs +++ b/src/status_im/ui/screens/events.cljs @@ -377,8 +377,7 @@ [:update-wallet] [:update-transactions] [:get-fcm-token] - [:update-sign-in-time] - [:show-mainnet-is-default-alert]] + [:update-sign-in-time]] (seq events-after) (into events-after))})) (handlers/register-handler-fx