Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mob][photos] Regularly check for wifi

laurenspriem7800b7db32de
diff --git a/mobile/lib/services/machine_learning/face_ml/face_ml_service.dart b/mobile/lib/services/machine_learning/face_ml/face_ml_service.dart
index b9ccc510e8..b017999faa 100644
--- a/mobile/lib/services/machine_learning/face_ml/face_ml_service.dart
+++ b/mobile/lib/services/machine_learning/face_ml/face_ml_service.dart
@@ -509,13 +509,13 @@ class FaceMlService {
}
}
}
- if (!await canUseHighBandwidth()) {
- _logger
- .info('stopping indexing because user is not connected to wifi');
- continue;
- }
final smallerChunks = chunk.chunks(_fileDownloadLimit);
for (final smallestChunk in smallerChunks) {
+ if (!await canUseHighBandwidth()) {
+ _logger.info(
+ 'stopping indexing because user is not connected to wifi',);
+ break outerLoop;
+ }
for (final enteFile in smallestChunk) {
if (_shouldPauseIndexingAndClustering) {
_logger.info("indexAllImages() was paused, stopping");