π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Cancel face crop task if not needed
laurenspriem7cc3ab1004bf
diff --git a/mobile/lib/ui/viewer/search/result/person_face_widget.dart b/mobile/lib/ui/viewer/search/result/person_face_widget.dartindex 5cf99a7fb5..62c18ec618 100644--- a/mobile/lib/ui/viewer/search/result/person_face_widget.dart+++ b/mobile/lib/ui/viewer/search/result/person_face_widget.dart@@ -60,6 +60,15 @@ class _PersonFaceWidgetState extends State<PersonFaceWidget> {: _getFaceCrop();}+ @override+ void dispose() {+ super.dispose();+ checkStopTryingToGenerateFaceThumbnails(+ widget.file,+ useFullFile: widget.useFullFile,+ );+ }+@overrideWidget build(BuildContext context) {return FutureBuilder<Uint8List?>(diff --git a/mobile/lib/utils/face/face_box_crop.dart b/mobile/lib/utils/face/face_box_crop.dartindex 02656ff1e3..70ff5c18aa 100644--- a/mobile/lib/utils/face/face_box_crop.dart+++ b/mobile/lib/utils/face/face_box_crop.dart@@ -189,6 +189,19 @@ Future<Uint8List?> precomputeClusterFaceCrop(}}+void checkStopTryingToGenerateFaceThumbnails(+ EnteFile file, {+ bool useFullFile = true,+}) {+ final taskId =+ [file.uploadedFileID!, useFullFile ? "-full" : "-thumbnail"].join();+ if (useFullFile) {+ _queueFullFileFaceGenerations.removeTask(taskId);+ } else {+ _queueThumbnailFaceGenerations.removeTask(taskId);+ }+}+Future<Map<String, Uint8List>?> _getFaceCropsUsingHeapPriorityQueue(EnteFile file,Map<String, FaceBox> faceBoxeMap, {