Fix onboarding notifications request

Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
This commit is contained in:
Vitaliy Vlasov 2019-07-10 00:13:43 +03:00 committed by Andrey Shovkoplyas
parent 253c8c8e7a
commit 75162432e3
No known key found for this signature in database
GPG Key ID: EAAB7C8622D860A4
1 changed files with 4 additions and 3 deletions

View File

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