Skip to content

Commit

Permalink
fix: Attachment names on comments now elipsize correctly (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecoomber authored Nov 22, 2024
1 parent 1365251 commit 6f26ea6
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions lib/src/components/molecules/comment.dart
Original file line number Diff line number Diff line change
Expand Up @@ -246,20 +246,26 @@ class _AttachmentRow extends StatelessWidget {
size: 40,
),
SizedBox(width: spacing.small),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
attachment.name,
style: ZetaTextStyles.bodySmall,
),
if (attachment.size != null)
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
attachment.size!,
style: ZetaTextStyles.bodySmall.copyWith(color: colors.textSubtle),
attachment.name,
style: ZetaTextStyles.bodySmall,
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
],
if (attachment.size != null)
Text(
attachment.size!,
style: ZetaTextStyles.bodySmall.copyWith(color: colors.textSubtle),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
],
),
),
],
),
Expand Down

0 comments on commit 6f26ea6

Please sign in to comment.