Cache supported animated image formats

This commit is contained in:
Nicolas Werner 2021-12-29 07:40:32 +01:00
parent 4d54876ea4
commit f21bf5f97e
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9

View file

@ -33,7 +33,8 @@ MxcAnimatedImage::startDownload()
QByteArray mimeType = QString::fromStdString(mtx::accessors::mimetype(*event)).toUtf8();
animatable_ = QMovie::supportedFormats().contains(mimeType.split('/').back());
static const auto formats = QMovie::supportedFormats();
animatable_ = formats.contains(mimeType.split('/').back());
animatableChanged();
if (!animatable_)