Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mob][photos] Don't keep showing the banner

laurenspriem0f3e490699d7
diff --git a/mobile/lib/ui/home/status_bar_widget.dart b/mobile/lib/ui/home/status_bar_widget.dart
index 1eddcb1337..bd23dd34dc 100644
--- a/mobile/lib/ui/home/status_bar_widget.dart
+++ b/mobile/lib/ui/home/status_bar_widget.dart
@@ -37,7 +37,7 @@ class _StatusBarWidgetState extends State<StatusBarWidget> {
late StreamSubscription<NotificationEvent> _notificationSubscription;
bool _showStatus = false;
bool _showErrorBanner = false;
- final bool _showMlBanner = !userRemoteFlagService
+ bool _showMlBanner = !userRemoteFlagService
.getCachedBoolValue(UserRemoteFlagService.mlEnabled) &&
!localSettings.hasSeenMLEnablingBanner;
Error? _syncError;
@@ -75,6 +75,9 @@ class _StatusBarWidgetState extends State<StatusBarWidget> {
_notificationSubscription =
Bus.instance.on<NotificationEvent>().listen((event) {
if (mounted) {
+ _showMlBanner = !userRemoteFlagService
+ .getCachedBoolValue(UserRemoteFlagService.mlEnabled) &&
+ !localSettings.hasSeenMLEnablingBanner;
setState(() {});
}
});
diff --git a/mobile/lib/ui/settings/ml/enable_ml_consent.dart b/mobile/lib/ui/settings/ml/enable_ml_consent.dart
index ea11e132aa..e9fb4ffb6e 100644
--- a/mobile/lib/ui/settings/ml/enable_ml_consent.dart
+++ b/mobile/lib/ui/settings/ml/enable_ml_consent.dart
@@ -149,6 +149,7 @@ class _EnableMachineLearningConsentState
UserRemoteFlagService.mlEnabled,
true,
);
+ Bus.instance.fire(NotificationEvent());
Navigator.of(context).pop(true);
} catch (e) {
// ignore: unawaited_futures