Improve download file

This commit is contained in:
Christian Pauly 2020-03-13 22:04:32 +01:00
parent 4900137e2a
commit 0ce9635e8d

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,
),
),
], ],
), ),
); );