Skip to content

Commit

Permalink
Fix onboarding notifications request
Browse files Browse the repository at this point in the history
Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
  • Loading branch information
Vitaliy Vlasov authored and flexsurfer committed Jul 10, 2019
1 parent 253c8c8 commit 7516243
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/status_im/accounts/create/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,7 @@
(navigation/navigate-to-clean :intro nil)))))

(fx/defn exit-wizard [{:keys [db] :as cofx}]
(fx/merge {:db (dissoc db :intro-wizard)
:notifications/request-notifications-permissions nil}
(fx/merge {:db (dissoc db :intro-wizard)}
(navigation/navigate-to-cofx :home nil)))

(fx/defn init-key-generation [{:keys [db] :as cofx}]
Expand Down Expand Up @@ -199,7 +198,9 @@
[{:keys [db] :as cofx} {:keys [skip?] :as opts}]
(let [step (get-in db [:intro-wizard :step])]
(cond (= step :enable-notifications)
(exit-wizard cofx)
(fx/merge cofx
(when-not skip? {:notifications/request-notifications-permissions nil})
exit-wizard)

(= step :generate-key)
(init-key-generation cofx)
Expand Down

0 comments on commit 7516243

Please sign in to comment.