Improve download file

This commit is contained in:
Christian Pauly 2020-03-13 22:04:32 +01:00
parent 4900137e2a
commit 0ce9635e8d
1 changed files with 13 additions and 12 deletions

View File

@ -80,23 +80,24 @@ class MessageContent extends StatelessWidget {
.getDownloadLink(event.room.client), .getDownloadLink(event.room.client),
), ),
), ),
if (event.sizeString != null)
Text(
event.sizeString,
style: TextStyle(
color: textColor,
fontStyle: FontStyle.italic,
),
),
Text( Text(
(event.content.containsKey("filename") "- " +
? event.content["filename"] (event.content.containsKey("filename")
: event.body), ? event.content["filename"]
: event.body),
style: TextStyle( style: TextStyle(
color: textColor, color: textColor,
fontStyle: FontStyle.italic, fontWeight: FontWeight.bold,
), ),
), ),
if (event.sizeString != null)
Text(
"- " + event.sizeString,
style: TextStyle(
color: textColor,
fontWeight: FontWeight.bold,
),
),
], ],
), ),
); );