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 GitHub
parent 3c102b9797
commit 11bd340a94
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 3 deletions

View File

@ -46,6 +46,11 @@
(when (show-confirmation-modal? db) (when (show-confirmation-modal? db)
{:fx [[:dispatch {:fx [[:dispatch
[:show-bottom-sheet [:show-bottom-sheet
{:content (fn [] [modal-view]) {:content (fn [] [modal-view])
:shell? true}]]]}))) ;; 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))) (update :profile/login #(select-profile % key-uid)))
db-with-settings) db-with-settings)
:fx [[:dispatch [:init-root :screen/profile.profiles]] :fx [[:dispatch [:init-root :screen/profile.profiles]]
(when key-uid (when (and key-uid userConfirmed)
[:effects.biometric/check-if-available [:effects.biometric/check-if-available
{:key-uid key-uid {:key-uid key-uid
:on-success (fn [auth-method] :on-success (fn [auth-method]