Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[mob][photos] Keep consent failures and button success out of the grant path

r4khulbdfb7d64dd73
diff --git a/mobile/apps/photos/lib/ui/home/grant_permissions_widget.dart b/mobile/apps/photos/lib/ui/home/grant_permissions_widget.dart
index f9f7e4fddf..9acfe4ac8f 100644
--- a/mobile/apps/photos/lib/ui/home/grant_permissions_widget.dart
+++ b/mobile/apps/photos/lib/ui/home/grant_permissions_widget.dart
@@ -260,7 +260,11 @@ class _GrantPermissionsWidgetState extends State<GrantPermissionsWidget>
await AppLifecycleService.instance.preferencesReloaded;
await localSettings.setAppMode(AppMode.localGallery);
localSettings.localGalleryModeEnabledThisSession = true;
- await setMLConsent(true);
+ try {
+ await setMLConsent(true);
+ } catch (e) {
+ _logger.severe("Failed to record ML consent after permission grant", e);
+ }
Bus.instance.fire(AppModeChangedEvent());
await permissionService.onUpdatePermission(state);
await localSettings.setLocalGalleryOnboardingPending(false);
@@ -429,6 +433,7 @@ class _GrantPermissionsWidgetState extends State<GrantPermissionsWidget>
variant: ButtonComponentVariant.neutral,
density: ButtonComponentDensity.compact,
label: context.strings.continueLabel,
+ shouldShowSuccessState: false,
onTap: _onTapOfflineGrantPermission,
),
const Flexible(child: SizedBox(height: 42)),