fix: encrypted files

This commit is contained in:
Sorunome 2021-08-29 15:18:02 +02:00
commit 721b444965
3 changed files with 7 additions and 8 deletions

View file

@ -261,12 +261,11 @@ class _ImageBubbleState extends State<ImageBubble> {
widget.event.attachmentOrThumbnailMxcUrl(getThumbnail: true) ==
widget.event.attachmentMxcUrl;
final key = isOriginal
? widget.event.attachmentMxcUrl
: widget.event.thumbnailMxcUrl;
? widget.event.attachmentMxcUrl.toString()
: widget.event.thumbnailMxcUrl.toString();
final mimetype = getMimetype(!isOriginal);
if (_contentRenderers.containsKey(mimetype)) {
return _contentRenderers[mimetype]
.memory(_displayFile.bytes, key.toString());
return _contentRenderers[mimetype].memory(_displayFile.bytes, key);
} else {
return Image.memory(
_displayFile.bytes,