Fix ImageDelegate
Restore the animated mediaInfo to eventHandler and make sure ImageDelegate uses the media helper size for the sourceSize.
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
|
||||
#include "eventhandler.h"
|
||||
|
||||
#include <QMovie>
|
||||
|
||||
#include <KLocalizedString>
|
||||
|
||||
#include <Quotient/eventitem.h>
|
||||
@@ -667,6 +669,9 @@ QVariantMap EventHandler::getMediaInfoFromFileInfo(const EventContent::FileInfo
|
||||
mediaInfo["width"_ls] = castInfo->imageSize.width();
|
||||
mediaInfo["height"_ls] = castInfo->imageSize.height();
|
||||
|
||||
// TODO: Images in certain formats (e.g. WebP) will be erroneously marked as animated, even if they are static.
|
||||
mediaInfo["animated"_ls] = QMovie::supportedFormats().contains(mimeType.preferredSuffix().toUtf8());
|
||||
|
||||
if (!isThumbnail) {
|
||||
QVariantMap tempInfo;
|
||||
auto thumbnailInfo = getMediaInfoFromFileInfo(castInfo->thumbnailInfo(), eventId, true);
|
||||
|
||||
Reference in New Issue
Block a user