Skip to content

armgit / ente

Public Imported from GitHub
0

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

hide ML banner in online mode

AmanRajSinghMourya030d7215112a
diff --git a/mobile/apps/photos/lib/ui/components/banners/ml_progress_banner.dart b/mobile/apps/photos/lib/ui/components/banners/ml_progress_banner.dart
index 43021b5316..ace033d011 100644
--- a/mobile/apps/photos/lib/ui/components/banners/ml_progress_banner.dart
+++ b/mobile/apps/photos/lib/ui/components/banners/ml_progress_banner.dart
@@ -51,7 +51,8 @@ class _MLProgressBannerState extends State<MLProgressBanner> {
_indexingComplete = false;
_ensurePolling();
});
- _notificationSubscription = Bus.instance.on<NotificationEvent>().listen((_) {
+ _notificationSubscription =
+ Bus.instance.on<NotificationEvent>().listen((_) {
_indexingComplete = false;
_ensurePolling();
});
@@ -114,6 +115,7 @@ class _MLProgressBannerState extends State<MLProgressBanner> {
@override
Widget build(BuildContext context) {
+ if (!isOfflineMode) return const SizedBox.shrink();
if (_dismissed) return const SizedBox.shrink();
if (!hasGrantedMLConsent) return const SizedBox.shrink();
if (localSettings.isMLProgressBannerDismissed) {