File tree 4 files changed +24
-7
lines changed
4 files changed +24
-7
lines changed Original file line number Diff line number Diff line change 8
8
[status-im2.common.parallax.whitelist :as whitelist]
9
9
[status-im2.common.resources :as resources]
10
10
[status-im2.contexts.onboarding.enable-biometrics.style :as style]
11
+ [status-im2.navigation.state :as state]
11
12
[utils.i18n :as i18n]
12
13
[utils.re-frame :as rf]))
13
14
36
37
{:accessibility-label :maybe-later-button
37
38
:background :blur
38
39
:type :grey
39
- :on-press #(rf/dispatch [:onboarding-2/create-account-and-login ])
40
+ :on-press #(rf/dispatch (if (= :syncing-results @state/root-id)
41
+ [:navigate-to-within-stack
42
+ [:enable-notifications :enable-biometrics ]]
43
+ [:onboarding-2/create-account-and-login ]))
40
44
:container-style {:margin-top 12 }}
41
45
(i18n/label :t/maybe-later )]]))
42
46
Original file line number Diff line number Diff line change 6
6
[status-im2.constants :as constants]
7
7
[status-im2.contexts.profile.create.events :as profile.create]
8
8
[status-im2.contexts.profile.recover.events :as profile.recover]
9
+ [status-im2.navigation.state :as state]
9
10
[taoensso.timbre :as log]
10
11
[utils.i18n :as i18n]
11
12
[utils.re-frame :as rf]
39
40
{:events [:onboarding-2/biometrics-done ]}
40
41
[{:keys [db]}]
41
42
{:db (assoc-in db [:onboarding-2/profile :auth-method ] constants/auth-method-biometric)
42
- :dispatch [:onboarding-2/create-account-and-login ]})
43
+ :dispatch (if (= :syncing-results @state/root-id)
44
+ [:navigate-to-within-stack [:enable-notifications :enable-biometrics ]]
45
+ [:onboarding-2/create-account-and-login ])})
43
46
44
47
(rf/defn biometrics-fail
45
48
{:events [:onboarding-2/biometrics-fail ]}
83
86
[:navigate-to-within-stack [:enable-biometrics :new-to-status ]]
84
87
[:onboarding-2/create-account-and-login ])}))
85
88
89
+ (rf/defn navigate-to-enable-biometrics
90
+ {:events [:onboarding-2/navigate-to-enable-biometrics ]}
91
+ [{:keys [db]}]
92
+ (let [supported-type (:biometric/supported-type db)]
93
+ {:dispatch (if supported-type
94
+ [:open-modal :enable-biometrics ]
95
+ [:open-modal :enable-notifications ])}))
96
+
86
97
(rf/defn seed-phrase-entered
87
98
{:events [:onboarding-2/seed-phrase-entered ]}
88
99
[_ seed-phrase on-error]
Original file line number Diff line number Diff line change 54
54
{:on-press (fn []
55
55
(when on-press
56
56
(on-press ))
57
- (rf/dispatch [:open-modal : enable-notifications ]))
57
+ (rf/dispatch [:onboarding-2/navigate-to- enable-biometrics ]))
58
58
:accessibility-label :continue-button
59
59
:customization-color profile-color
60
60
:container-style style/continue-button}
Original file line number Diff line number Diff line change 157
157
:component create-password/create-password}
158
158
159
159
{:name :enable-biometrics
160
- :options {:theme :dark
161
- :layout options/onboarding-transparent-layout
162
- :animations transitions/push-animations-for-transparent-background
163
- :popGesture false }
160
+ :options {:theme :dark
161
+ :layout options/onboarding-transparent-layout
162
+ :animations (merge transitions/new-to-status-modal-animations
163
+ transitions/push-animations-for-transparent-background)
164
+ :popGesture false
165
+ :modalPresentationStyle :overCurrentContext }
164
166
:component enable-biometrics/enable-biometrics}
165
167
166
168
{:name :generating-keys
You can’t perform that action at this time.
0 commit comments