diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-12-29 07:40:32 +0100 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-12-29 07:40:32 +0100 |
commit | f21bf5f97e6d52534f24ba9c0cad66105bdb5122 (patch) | |
tree | c8d87186d8b2298489a9c96a322a618150c5bb31 /src/ui/MxcAnimatedImage.cpp | |
parent | Pretty up code with fewer allocations (diff) | |
download | nheko-f21bf5f97e6d52534f24ba9c0cad66105bdb5122.tar.xz |
Cache supported animated image formats
Diffstat (limited to 'src/ui/MxcAnimatedImage.cpp')
-rw-r--r-- | src/ui/MxcAnimatedImage.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ui/MxcAnimatedImage.cpp b/src/ui/MxcAnimatedImage.cpp index 8e39558f..3c82c614 100644 --- a/src/ui/MxcAnimatedImage.cpp +++ b/src/ui/MxcAnimatedImage.cpp @@ -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_) |