EventImage: set prop correctly if no thumbnail

Fix cases where a m.image event doesn't have a thumbnail but we tried to
download one anyway, resulting in a DownloadFailed exception.
This commit is contained in:
miruka 2019-11-06 06:34:52 -04:00
parent 92d3390106
commit 93a4015369

View File

@ -10,7 +10,7 @@ HMxcImage {
animated: loader.singleMediaInfo.media_mime === "image/gif" || animated: loader.singleMediaInfo.media_mime === "image/gif" ||
Utils.urlExtension(loader.mediaUrl) === "gif" Utils.urlExtension(loader.mediaUrl) === "gif"
clientUserId: chatPage.userId clientUserId: chatPage.userId
thumbnail: ! animated thumbnail: ! animated && loader.thumbnailMxc
mxc: thumbnail ? mxc: thumbnail ?
(loader.thumbnailMxc || loader.mediaUrl) : (loader.thumbnailMxc || loader.mediaUrl) :
(loader.mediaUrl || loader.thumbnailMxc) (loader.mediaUrl || loader.thumbnailMxc)