π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Fixing the # years ago issue
laurenspriem26103fe1763c
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 b1920adefc..2c1ddf87d7 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@@ -765,12 +765,22 @@ class _MemoryLanePageState extends State<MemoryLanePage>final double slotWidth = samplePainter.width;final double slotHeight = samplePainter.height;final String formattedCurrent = numberFormat.format(currentRounded);- final String fullText = captionType == _CaptionType.age- ? l10n.facesTimelineCaptionYearsOld(- name: widget.person.data.name,- count: currentRounded,- )- : l10n.facesTimelineCaptionYearsAgo(count: currentRounded);+ String fullText;+ if (captionType == _CaptionType.age) {+ fullText = l10n.facesTimelineCaptionYearsOld(+ name: widget.person.data.name,+ count: currentRounded,+ );+ } else {+ fullText = l10n.facesTimelineCaptionYearsAgo(count: currentRounded);+ if (fullText.contains("#")) {+ fullText = fullText.replaceAll("#", formattedCurrent);+ }+ final String name = widget.person.data.name;+ if (name.isNotEmpty) {+ fullText = "$name $fullText";+ }+ }final int insertionIndex = fullText.indexOf(formattedCurrent);final InlineSpan captionSpan;if (insertionIndex == -1) {