Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Crossfade latest comment text

ashilknc6f6af6ba7c1
diff --git a/mobile/apps/photos/lib/ui/social/widgets/file_social_overlay.dart b/mobile/apps/photos/lib/ui/social/widgets/file_social_overlay.dart
index 8c0f185beb..1c37c9e39f 100644
--- a/mobile/apps/photos/lib/ui/social/widgets/file_social_overlay.dart
+++ b/mobile/apps/photos/lib/ui/social/widgets/file_social_overlay.dart
@@ -542,11 +542,21 @@ class _LatestCommentPill extends StatelessWidget {
horizontal: 16,
vertical: 12,
),
- child: Text(
- comment.data,
- maxLines: 1,
- overflow: TextOverflow.ellipsis,
- style: textStyle,
+ child: AnimatedSwitcher(
+ duration: _motionDuration(context, 180),
+ switchInCurve: const Interval(0.25, 1, curve: Curves.easeOut),
+ switchOutCurve: const Interval(0.6, 1, curve: Curves.easeIn),
+ layoutBuilder: (currentChild, previousChildren) => Stack(
+ alignment: AlignmentDirectional.centerStart,
+ children: [...previousChildren, ?currentChild],
+ ),
+ child: Text(
+ comment.data,
+ key: ValueKey(comment.id),
+ maxLines: 1,
+ overflow: TextOverflow.ellipsis,
+ style: textStyle,
+ ),
),
),
),