π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Support for custom domain url replacement
Neeraj Gupta5e993b952632
diff --git a/mobile/apps/photos/lib/services/collections_service.dart b/mobile/apps/photos/lib/services/collections_service.dartindex 0ca65d8bc6..0349c3a86d 100644--- a/mobile/apps/photos/lib/services/collections_service.dart+++ b/mobile/apps/photos/lib/services/collections_service.dart@@ -755,10 +755,16 @@ class CollectionsService {String getPublicUrl(Collection c) {final PublicURL url = c.publicURLs.firstOrNull!;+ Uri publicUrl = Uri.parse(url.url);+ final String customDomain = flagService.customDomain;+ if (customDomain.isNotEmpty) {+ publicUrl =+ publicUrl.replace(host: customDomain, scheme: "https", port: 443);+ }final String collectionKey = Base58Encode(CollectionsService.instance.getCollectionKey(c.id),);- final String urlValue = "${url.url}#$collectionKey";+ final String urlValue = "${publicUrl.toString()}#$collectionKey";return urlValue;}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 39bd5cb929..66fda0c674 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@@ -60,6 +60,8 @@ class FlagService {String get castUrl => flags.castUrl;+ String get customDomain => flags.customDomain;+bool hasSyncedAccountFlags() {return _prefs.containsKey("remote_flags");}