π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mob][photos] Rename keys
laurenspriem0a2090e2fbe3
diff --git a/mobile/lib/services/machine_learning/ml_service.dart b/mobile/lib/services/machine_learning/ml_service.dartindex 1aee31b378..e8563a7ac9 100644--- a/mobile/lib/services/machine_learning/ml_service.dart+++ b/mobile/lib/services/machine_learning/ml_service.dart@@ -101,7 +101,7 @@ class MLService {}bool canFetch() {- if (localSettings.isMLIndexingEnabled) return true;+ if (localSettings.isMLLocalIndexingEnabled) return true;if (lastRemoteFetch == null) {lastRemoteFetch = DateTime.now().millisecondsSinceEpoch;return true;@@ -196,7 +196,7 @@ class MLService {stream:await for (final chunk in instructionStream) {- if (!localSettings.isMLIndexingEnabled) {+ if (!localSettings.isMLLocalIndexingEnabled) {await MLIndexingIsolate.instance.cleanupLocalIndexingModels();continue;} else if (!await canUseHighBandwidth()) {@@ -560,7 +560,7 @@ class MLService {void _logStatus() {final String status = '''isInternalUser: ${flagService.internalUser}- Local indexing: ${localSettings.isMLIndexingEnabled}+ Local indexing: ${localSettings.isMLLocalIndexingEnabled}canRunMLController: $_mlControllerStatusisIndexingOrClusteringRunning: $_isIndexingOrClusteringRunningshouldPauseIndexingAndClustering: $_shouldPauseIndexingAndClusteringdiff --git a/mobile/lib/ui/settings/debug/ml_debug_section_widget.dart b/mobile/lib/ui/settings/debug/ml_debug_section_widget.dartindex fef7888da2..098845c657 100644--- a/mobile/lib/ui/settings/debug/ml_debug_section_widget.dart+++ b/mobile/lib/ui/settings/debug/ml_debug_section_widget.dart@@ -147,7 +147,7 @@ class _MLDebugSectionWidgetState extends State<MLDebugSectionWidget> {title: "Local indexing",),trailingWidget: ToggleSwitchWidget(- value: () => localSettings.isMLIndexingEnabled,+ value: () => localSettings.isMLLocalIndexingEnabled,onChanged: () async {final localIndexing = await localSettings.toggleLocalMLIndexing();if (localIndexing) {diff --git a/mobile/lib/ui/settings/ml/machine_learning_settings_page.dart b/mobile/lib/ui/settings/ml/machine_learning_settings_page.dartindex 67c2297fbb..867c559102 100644--- a/mobile/lib/ui/settings/ml/machine_learning_settings_page.dart+++ b/mobile/lib/ui/settings/ml/machine_learning_settings_page.dart@@ -280,7 +280,7 @@ class _MachineLearningSettingsPageStatetitle: S.of(context).localIndexing,),trailingWidget: ToggleSwitchWidget(- value: () => localSettings.isMLIndexingEnabled,+ value: () => localSettings.isMLLocalIndexingEnabled,onChanged: () async {final localIndexing =await localSettings.toggleLocalMLIndexing();@@ -309,7 +309,7 @@ class _MachineLearningSettingsPageStateheight: 12,),MLIndexingIsolate.instance.areModelsDownloaded ||- !localSettings.isMLIndexingEnabled+ !localSettings.isMLLocalIndexingEnabled? const MLStatusWidget(): const ModelLoadingState(),],diff --git a/mobile/lib/utils/local_settings.dart b/mobile/lib/utils/local_settings.dartindex f4bbfa0e8d..e293375653 100644--- a/mobile/lib/utils/local_settings.dart+++ b/mobile/lib/utils/local_settings.dart@@ -11,7 +11,7 @@ enum AlbumSortKey {class LocalSettings {static const kCollectionSortPref = "collection_sort_pref";static const kPhotoGridSize = "photo_grid_size";- static const _kisMLIndexingEnabled = "ls.enable_ml_idx";+ static const _kisMLLocalIndexingEnabled = "ls.ml_local_indexing";static const kRateUsShownCount = "rate_us_shown_count";static const kEnableMultiplePart = "ls.enable_multiple_part";static const kRateUsPromptThreshold = 2;@@ -58,8 +58,8 @@ class LocalSettings {return getRateUsShownCount() < kRateUsPromptThreshold;}- bool get isMLIndexingEnabled =>- _prefs.getBool(_kisMLIndexingEnabled) ?? enoughRamForLocalIndexing;+ bool get isMLLocalIndexingEnabled =>+ _prefs.getBool(_kisMLLocalIndexingEnabled) ?? enoughRamForLocalIndexing;bool get userEnabledMultiplePart =>_prefs.getBool(kEnableMultiplePart) ?? false;@@ -71,8 +71,8 @@ class LocalSettings {/// toggleFaceIndexing toggles the face indexing setting and returns the new valueFuture<bool> toggleLocalMLIndexing() async {- await _prefs.setBool(_kisMLIndexingEnabled, !isMLIndexingEnabled);- return isMLIndexingEnabled;+ await _prefs.setBool(_kisMLLocalIndexingEnabled, !isMLLocalIndexingEnabled);+ return isMLLocalIndexingEnabled;}//#region todo:(NG) remove this section, only needed for internal testing to see