π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mob][photos] Report ML sheet success only after enabling finishes
r4khul5db65ddd662b
diff --git a/mobile/apps/photos/lib/ui/settings/ml/ml_consent_sheet.dart b/mobile/apps/photos/lib/ui/settings/ml/ml_consent_sheet.dartindex 485c613986..a62843fef3 100644--- a/mobile/apps/photos/lib/ui/settings/ml/ml_consent_sheet.dart+++ b/mobile/apps/photos/lib/ui/settings/ml/ml_consent_sheet.dart@@ -13,16 +13,17 @@ import "package:styled_text/styled_text.dart";Future<bool> showMLConsentSheet(BuildContext context) async {Future<void>? enabling;+ var enabled = false;var declined = false;await showBottomSheetComponent<void>(context: context,builder: (_) => _MLConsentSheet(- onEnable: () => enabling = enableMLConsent(),+ onEnable: () => enabling = enableMLConsent().then((_) => enabled = true),onDecline: () => declined = true,),);await enabling?.catchError((Object _) {});- if (hasGrantedMLConsent) {+ if (enabled) {return true;}if (declined) {