π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Include titles in memory link shares
Neeraj Guptae3311a682605
diff --git a/mobile/apps/photos/lib/ui/home/memories/full_screen_memory.dart b/mobile/apps/photos/lib/ui/home/memories/full_screen_memory.dartindex a9b74383be..2f7c10d3f3 100644--- a/mobile/apps/photos/lib/ui/home/memories/full_screen_memory.dart+++ b/mobile/apps/photos/lib/ui/home/memories/full_screen_memory.dart@@ -1408,7 +1408,14 @@ Future<void> _shareMemory(if (!context.mounted || shareLinkData == null) {return;}- await shareText(shareLinkData.$1, context: context);+ final title = memoryTitle.trim();+ await shareText(+ formatMemoryShareText(+ title.isNotEmpty ? title : AppLocalizations.of(context).memories,+ shareLinkData.$1,+ ),+ context: context,+ );return;case MemoryShareSheetAction.shareItems:await share(context, Memory.filesFromMemories(result.selectedMemories));diff --git a/mobile/apps/photos/lib/ui/sharing/memory_link_details_sheet.dart b/mobile/apps/photos/lib/ui/sharing/memory_link_details_sheet.dartindex 6fffc76cb1..68b2268ec5 100644--- a/mobile/apps/photos/lib/ui/sharing/memory_link_details_sheet.dart+++ b/mobile/apps/photos/lib/ui/sharing/memory_link_details_sheet.dart@@ -16,6 +16,7 @@ Future<bool?> showMemoryLinkDetailsSheet(BuildContext context, {required String shareUrl,required int shareId,+ required String title,}) {final l10n = AppLocalizations.of(context);return showBaseBottomSheet<bool>(@@ -80,7 +81,12 @@ Future<bool?> showMemoryLinkDetailsSheet(labelText: l10n.shareLink,shouldSurfaceExecutionStates: false,onTap: () async {- unawaited(shareText(shareUrl, context: context));+ unawaited(+ shareText(+ formatMemoryShareText(title, shareUrl),+ context: context,+ ),+ );},),const SizedBox(height: 12),diff --git a/mobile/apps/photos/lib/ui/tabs/shared/all_links_page.dart b/mobile/apps/photos/lib/ui/tabs/shared/all_links_page.dartindex 1f5b66ffba..3963b4308c 100644--- a/mobile/apps/photos/lib/ui/tabs/shared/all_links_page.dart+++ b/mobile/apps/photos/lib/ui/tabs/shared/all_links_page.dart@@ -142,10 +142,14 @@ class _AllLinksPageState extends State<AllLinksPage> {}Future<void> _openMemoryLink(MemoryShare share) async {+ final title =+ MemoryShareService.instance.getMemoryShareTitle(share) ??+ AppLocalizations.of(context).memoryLink;final deleted = await showMemoryLinkDetailsSheet(context,shareUrl: share.url,shareId: share.id,+ title: title,);if (deleted != true || !mounted) return;setState(() {diff --git a/mobile/apps/photos/lib/ui/viewer/people/memory_lane_page.dart b/mobile/apps/photos/lib/ui/viewer/people/memory_lane_page.dartindex d89351ffc9..378b494dcc 100644--- a/mobile/apps/photos/lib/ui/viewer/people/memory_lane_page.dart+++ b/mobile/apps/photos/lib/ui/viewer/people/memory_lane_page.dart@@ -656,7 +656,10 @@ class _MemoryLanePageState extends State<MemoryLanePage>return;}await shareText(- shareLinkData.$1,+ formatMemoryShareText(+ l10n.facesTimelineAppBarTitle,+ shareLinkData.$1,+ ),context: context,);},diff --git a/mobile/apps/photos/lib/utils/share_util.dart b/mobile/apps/photos/lib/utils/share_util.dartindex 3244a9a998..d594813296 100644--- a/mobile/apps/photos/lib/utils/share_util.dart+++ b/mobile/apps/photos/lib/utils/share_util.dart@@ -136,6 +136,9 @@ Future<ShareResult> shareText(}}+String formatMemoryShareText(String title, String shareUrl) =>+ '$title: $shareUrl';+/// Shares URL first with description belowFuture<ShareResult> shareLinkWithDescription(String url, {