fix 'Usage data' bottom sheet reappears after reopening the app if you swipe it down on onboarding (#20945)

This commit is contained in:
Parvesh Monu 2024-08-02 15:17:18 +05:30 committed by Icaro Motta
parent f69f075e29
commit da2e5ff1c0
2 changed files with 8 additions and 3 deletions

View File

@ -47,5 +47,10 @@
{:fx [[:dispatch
[:show-bottom-sheet
{:content (fn [] [modal-view])
;; When in the profiles screen do biometric auth after the metrics sheet is dismissed
;; https://github.com/status-im/status-mobile/issues/20932
:on-close (when (= (:view-id db) :screen/profile.profiles)
#(rf/dispatch [:profile.login/login-with-biometric-if-available
(get-in db [:profile/login :key-uid])]))
:shell? true}]]]})))

View File

@ -54,7 +54,7 @@
(update :profile/login #(select-profile % key-uid)))
db-with-settings)
:fx [[:dispatch [:init-root :screen/profile.profiles]]
(when key-uid
(when (and key-uid userConfirmed)
[:effects.biometric/check-if-available
{:key-uid key-uid
:on-success (fn [auth-method]