π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Add dedicated petEnabled flag and remove orphaned clustering files
Amrithesh Kakkoth Ente91e22ed17c5d
diff --git a/mobile/apps/photos/lib/services/machine_learning/ml_indexing_isolate.dart b/mobile/apps/photos/lib/services/machine_learning/ml_indexing_isolate.dartindex 0bc8da674d..be4665f924 100644--- a/mobile/apps/photos/lib/services/machine_learning/ml_indexing_isolate.dart+++ b/mobile/apps/photos/lib/services/machine_learning/ml_indexing_isolate.dart@@ -191,7 +191,7 @@ class MLIndexingIsolate extends SuperIsolate {ClipImageEncoder.instance.downloadModel(forceRefresh),];- if (flagService.internalUser &&+ if (flagService.petEnabled &&localSettings.petRecognitionEnabled &&_shouldUseRustMl) {modelsToDownload.addAll([@@ -381,7 +381,7 @@ class MLIndexingIsolate extends SuperIsolate {String petBodyEmbeddingDogPath = "";String petBodyEmbeddingCatPath = "";- if (flagService.internalUser && localSettings.petRecognitionEnabled) {+ if (flagService.petEnabled && localSettings.petRecognitionEnabled) {petFaceDetectionPath =(await PetFaceDetectionService.instance.getModelNameAndPath()).$2;petFaceEmbeddingDogPath =diff --git a/mobile/apps/photos/lib/ui/viewer/file/file_details_widget.dart b/mobile/apps/photos/lib/ui/viewer/file/file_details_widget.dartindex 0cb61eded4..b388248831 100644--- a/mobile/apps/photos/lib/ui/viewer/file/file_details_widget.dart+++ b/mobile/apps/photos/lib/ui/viewer/file/file_details_widget.dart@@ -306,7 +306,7 @@ class _FileDetailsWidgetState extends State<FileDetailsWidget> {FacesItemWidget(file),const FileDetailsDivider(),]);- if (flagService.internalUser && localSettings.petRecognitionEnabled) {+ if (flagService.petEnabled && localSettings.petRecognitionEnabled) {fileDetailsTiles.addAll([PetsItemWidget(file),const FileDetailsDivider(),diff --git a/mobile/apps/photos/lib/utils/ml_util.dart b/mobile/apps/photos/lib/utils/ml_util.dartindex f8d4229b72..982627de96 100644--- a/mobile/apps/photos/lib/utils/ml_util.dart+++ b/mobile/apps/photos/lib/utils/ml_util.dart@@ -77,7 +77,7 @@ Future<IndexStatus> getIndexStatus() async {final int facesIndexedFiles = await mlDataDB.getFaceIndexedFileCount();final int clipIndexedFiles = await mlDataDB.getClipIndexedFileCount();int indexedFiles = math.min(facesIndexedFiles, clipIndexedFiles);- if (flagService.internalUser &&+ if (flagService.petEnabled &&localSettings.petRecognitionEnabled &&localSettings.isMLLocalIndexingEnabled &&(flagService.useRustForML || isOfflineMode)) {@@ -112,7 +112,7 @@ Future<List<FileMLInstruction>> getFilesForMlIndexing() async {final Map<int, int> faceIndexedFileIDs = await mlDataDB.faceIndexedFileIds();final Map<int, int> clipIndexedFileIDs =await mlDataDB.clipIndexedFileWithVersion();- final bool petEnabled = flagService.internalUser &&+ final bool petEnabled = flagService.petEnabled &&localSettings.petRecognitionEnabled &&localSettings.isMLLocalIndexingEnabled &&(flagService.useRustForML || isOfflineMode);@@ -230,7 +230,7 @@ Future<List<FileMLInstruction>> getOfflineFilesForMlIndexing() async {final Map<int, int> faceIndexedFileIDs = await mlDataDB.faceIndexedFileIds();final Map<int, int> clipIndexedFileIDs =await mlDataDB.clipIndexedFileWithVersion();- final bool petEnabled = flagService.internalUser &&+ final bool petEnabled = flagService.petEnabled &&localSettings.petRecognitionEnabled &&(flagService.useRustForML || isOfflineMode);final Map<int, int> petIndexedFileIDs =diff --git a/mobile/apps/photos/plugins/ente_feature_flag/lib/src/service.dart b/mobile/apps/photos/plugins/ente_feature_flag/lib/src/service.dartindex 4f1ab63fcc..ee62126b7b 100644--- a/mobile/apps/photos/plugins/ente_feature_flag/lib/src/service.dart+++ b/mobile/apps/photos/plugins/ente_feature_flag/lib/src/service.dart@@ -102,6 +102,8 @@ class FlagService {bool get useRustForFaceThumbnails => internalUser;+ bool get petEnabled => internalUser;+bool get qrFeatureEnabled => internalUser;Future<void> tryRefreshFlags() async {