Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mob][photos] Respect startup ML fetch cooldown

laurenspriem6ec99771f62e
diff --git a/mobile/apps/photos/lib/services/machine_learning/ml_service.dart b/mobile/apps/photos/lib/services/machine_learning/ml_service.dart
index 937400cf3b..dd6ed0f981 100644
--- a/mobile/apps/photos/lib/services/machine_learning/ml_service.dart
+++ b/mobile/apps/photos/lib/services/machine_learning/ml_service.dart
@@ -183,6 +183,12 @@ class MLService {
!localSettings.remoteFetchEnabled) {
return;
}
+ if (!canFetch()) {
+ _logger.info(
+ "Skipping startup-owned remote ML hydration because remote fetch cooldown is active",
+ );
+ return;
+ }
_hasScheduledStartupOwnedRemoteHydration = true;
unawaited(_runStartupOwnedRemoteHydration());
}