Merge pull request #2034 from Kelrap/file-overflow

fix: Add flexible to file messages to prevent long name overflow
This commit is contained in:
Krille-chan 2025-07-27 07:58:42 +02:00 committed by GitHub
commit 0aefd17809
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -53,26 +53,28 @@ class MessageDownloadContent extends StatelessWidget {
backgroundColor: textColor.withAlpha(32),
child: Icon(Icons.file_download_outlined, color: textColor),
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Text(
filename,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: textColor,
fontWeight: FontWeight.w500,
Flexible(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Text(
filename,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: textColor,
fontWeight: FontWeight.w500,
),
),
),
Text(
'$sizeString | $filetype',
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(color: textColor, fontSize: 10),
),
],
Text(
'$sizeString | $filetype',
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(color: textColor, fontSize: 10),
),
],
),
),
],
),