π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Replace debug log prefixes with (for debugging)
ashilknb83615b411ea
diff --git a/mobile/apps/photos/lib/core/configuration.dart b/mobile/apps/photos/lib/core/configuration.dartindex 0cd95f32b2..4c079f5f25 100644--- a/mobile/apps/photos/lib/core/configuration.dart+++ b/mobile/apps/photos/lib/core/configuration.dart@@ -109,21 +109,21 @@ class Configuration {Directory(_sharedDocumentsMediaDirectory).createSync(recursive: true);if (!_preferences.containsKey(tokenKey)) {_logger- .info("------ Token not found, deleting all secure storage data");+ .info("(for debugging) Token not found, deleting all secure storage data");await _secureStorage.deleteAll();} else {- _logger.info("------ Token found, loading secure storage data");+ _logger.info("(for debugging) Token found, loading secure storage data");_key = await _secureStorage.read(key: keyKey,);_logger.info(- "------ Key loaded from secure storage, is null: ${_key == null}",+ "(for debugging) Key loaded from secure storage, is null: ${_key == null}",);_secretKey = await _secureStorage.read(key: secretKeyKey,);_logger.info(- "------ Secret Key loaded from secure storage, is null: ${_secretKey == null}",+ "(for debugging) Secret Key loaded from secure storage, is null: ${_secretKey == null}",);if (_key == null) {await logout(autoLogout: true);@@ -702,16 +702,16 @@ class Configuration {}Future<void> _migrateSecurityStorageToFirstUnlock() async {- _logger.info("------ Migrating secure storage to first unlock if needed");+ _logger.info("(for debugging) Migrating secure storage to first unlock if needed");final hasMigratedSecureStorage =_preferences.getBool(hasMigratedSecureStorageKey) ?? false;if (!hasMigratedSecureStorage && _key != null && _secretKey != null) {- _logger.info("------ Migrating secure storage to first unlock");+ _logger.info("(for debugging) Migrating secure storage to first unlock");await _secureStorage.write(key: keyKey, value: _key);await _secureStorage.write(key: secretKeyKey, value: _secretKey);await _preferences.setBool(hasMigratedSecureStorageKey, true);}- _logger.info("------ Migration check complete");+ _logger.info("(for debugging) Migration check complete");}Future<String> _getOrCreateAnonymousUserID() async {diff --git a/mobile/apps/photos/lib/main.dart b/mobile/apps/photos/lib/main.dartindex dbde216d70..1752f4f36a 100644--- a/mobile/apps/photos/lib/main.dart+++ b/mobile/apps/photos/lib/main.dart@@ -142,9 +142,9 @@ Future<void> _runMinimally(String taskId, TimeLogger tlog) async {final PackageInfo packageInfo = await PackageInfo.fromPlatform();final SharedPreferences prefs = await SharedPreferences.getInstance();- _logger.info("------ Configuration init $tlog");+ _logger.info("(for debugging) Configuration init $tlog");await Configuration.instance.init();- _logger.info("------ Configuration done $tlog");+ _logger.info("(for debugging) Configuration done $tlog");// App LifeCycleAppLifecycleService.instance.init(prefs);@@ -166,9 +166,9 @@ Future<void> _runMinimally(String taskId, TimeLogger tlog) async {packageInfo,);- _logger.info("------ CollectionsService init $tlog");+ _logger.info("(for debugging) CollectionsService init $tlog");await CollectionsService.instance.init(prefs);- _logger.info("------ CollectionsService init done $tlog");+ _logger.info("(for debugging) CollectionsService init done $tlog");// Upload & Sync Relatedawait FileUploader.instance.init(prefs, true);diff --git a/mobile/apps/photos/lib/services/account/user_service.dart b/mobile/apps/photos/lib/services/account/user_service.dartindex 77a7a25c29..f4c8e3deb2 100644--- a/mobile/apps/photos/lib/services/account/user_service.dart+++ b/mobile/apps/photos/lib/services/account/user_service.dart@@ -1279,7 +1279,7 @@ class UserService {Future<void> _saveConfiguration(dynamic response) async {final responseData = response is Map ? response : response.data as Map?;if (responseData == null) {- _logger.warning("------ Response data is null");+ _logger.warning("(for debugging) Response data is null");return;}