fix onboarding navigation to enable notification screen and blur issues (#20725)

This commit is contained in:
John Ngei 2024-07-23 15:18:43 +02:00 committed by GitHub
parent 89bb3ea5c3
commit a5c8182461
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 14 additions and 28 deletions

View File

@ -38,7 +38,7 @@
(rf/dispatch [:push-notifications/switch true]) (rf/dispatch [:push-notifications/switch true])
(rf/dispatch [:navigate-to-within-stack (rf/dispatch [:navigate-to-within-stack
[:screen/onboarding.welcome [:screen/onboarding.welcome
:screen/onboarding.enable-notifications]])) :screen/onboarding.generating-keys]]))
:type :primary :type :primary
:icon-left :i/notifications :icon-left :i/notifications
:accessibility-label :enable-notifications-button :accessibility-label :enable-notifications-button
@ -52,7 +52,7 @@
nil) nil)
(rf/dispatch [:navigate-to-within-stack (rf/dispatch [:navigate-to-within-stack
[:screen/onboarding.welcome [:screen/onboarding.welcome
:screen/onboarding.enable-notifications]])) :screen/onboarding.generating-keys]]))
:accessibility-label :enable-notifications-later-button :accessibility-label :enable-notifications-later-button
:type :grey :type :grey
:background :blur :background :blur

View File

@ -73,7 +73,9 @@
:onboarding/navigated-to-enter-seed-phrase-from-screen :onboarding/navigated-to-enter-seed-phrase-from-screen
:screen/onboarding.new-to-status)]] :screen/onboarding.new-to-status)]]
:dispatch-later [{:ms constants/onboarding-generating-keys-animation-duration-ms :dispatch-later [{:ms constants/onboarding-generating-keys-animation-duration-ms
:dispatch [:init-root :screen/onboarding.enable-notifications]}] :dispatch [:navigate-to-within-stack
[:screen/onboarding.enable-notifications
:screen/onboarding.generating-keys]]}]
:db (-> db :db (-> db
(dissoc :profile/login) (dissoc :profile/login)
(dissoc :auth-method) (dissoc :auth-method)
@ -187,14 +189,3 @@
{:key-uid key-uid {:key-uid key-uid
:error %})})))) :error %})}))))
(rf/defn navigate-to-identifiers
{:events [:onboarding/navigate-to-identifiers]}
[{:keys [db]}]
(if (:onboarding/generated-keys? db)
{:dispatch [:navigate-to-within-stack
[:screen/onboarding.identifiers
(get db
:onboarding/navigated-to-enter-seed-phrase-from-screen
:screen/onboarding.new-to-status)]]}
{:dispatch-later [{:ms constants/onboarding-generating-keys-navigation-retry-ms
:dispatch [:onboarding/navigate-to-identifiers]}]}))

View File

@ -37,15 +37,6 @@
:id :screen/profile.profiles :id :screen/profile.profiles
:options (options/dark-root-options)}}]}}} :options (options/dark-root-options)}}]}}}
:screen/onboarding.enable-notifications
{:root {:stack {:children [{:component {:name :screen/onboarding.enable-notifications
:id :screen/onboarding.enable-notifications
:options (options/dark-root-options)}}]}}}
:screen/onboarding.welcome
{:root {:stack {:children [{:component {:name :screen/onboarding.welcome
:id :screen/onboarding.welcome
:options (options/dark-root-options)}}]}}}
:screen/onboarding.syncing-results :screen/onboarding.syncing-results
{:root {:stack {:children [{:component {:name :screen/onboarding.syncing-results {:root {:stack {:children [{:component {:name :screen/onboarding.syncing-results
:id :screen/onboarding.syncing-results :id :screen/onboarding.syncing-results

View File

@ -352,7 +352,11 @@
:layout options/onboarding-transparent-layout :layout options/onboarding-transparent-layout
:animations (merge :animations (merge
transitions/new-to-status-modal-animations transitions/new-to-status-modal-animations
transitions/push-animations-for-transparent-background)} transitions/push-animations-for-transparent-background)
:popGesture false
:modalPresentationStyle :overCurrentContext
:hardwareBackButton {:dismissModalOnPress false
:popStackOnPress false}}
:component enable-notifications/view} :component enable-notifications/view}
{:name :screen/onboarding.identifiers {:name :screen/onboarding.identifiers