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 { late StreamSubscription _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 { _notificationSubscription = Bus.instance.on().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