π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mob][photos] Fix ml not stopping on interaction
laurenspriem1d50cdeeca5a
diff --git a/mobile/lib/services/machine_learning/ml_service.dart b/mobile/lib/services/machine_learning/ml_service.dartindex ebe56b893e..36a550098b 100644--- a/mobile/lib/services/machine_learning/ml_service.dart+++ b/mobile/lib/services/machine_learning/ml_service.dart@@ -165,12 +165,13 @@ class MLService {int fileAnalyzedCount = 0;final Stopwatch stopwatch = Stopwatch()..start();+ stream:await for (final chunk in instructionStream) {if (!await canUseHighBandwidth()) {_logger.info('stopping indexing because user is not connected to wifi',);- break;+ break stream;} else {await _ensureDownloadedModels();}@@ -178,7 +179,7 @@ class MLService {for (final instruction in chunk) {if (_shouldPauseIndexingAndClustering) {_logger.info("indexAllImages() was paused, stopping");- break;+ break stream;}await _ensureLoadedModels(instruction);futures.add(processImage(instruction));