mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-09-10 12:03:18 +02:00
Chat-view: animated image messages aren't animated
Change-Id: I98e8307c1d44a983939a096e2171ff8cf12f4220 GitLab: #860
This commit is contained in:
parent
72315f918d
commit
a891b2636f
1 changed files with 3 additions and 2 deletions
|
@ -589,6 +589,9 @@ MessagesAdapter::isLocalImage(const QString& mimename)
|
|||
[fileFormat](QByteArray format) {
|
||||
return format == fileFormat;
|
||||
});
|
||||
if (*iterator == "gif") {
|
||||
return {{"isAnimatedImage", true}};
|
||||
}
|
||||
return {{"isImage", iterator != supportedFormats.end()}};
|
||||
}
|
||||
return {{"isImage", false}};
|
||||
|
@ -610,7 +613,6 @@ MessagesAdapter::getMediaInfo(const QString& msg)
|
|||
return fileInfo;
|
||||
}
|
||||
static const QRegExp vPattern("(video/)(avi|mov|webm|webp|rmvb)$", Qt::CaseInsensitive);
|
||||
auto match = vPattern.indexIn(mime.name());
|
||||
QString type = vPattern.capturedTexts().size() == 3 ? vPattern.capturedTexts()[1] : "";
|
||||
if (!type.isEmpty()) {
|
||||
return {
|
||||
|
@ -619,7 +621,6 @@ MessagesAdapter::getMediaInfo(const QString& msg)
|
|||
};
|
||||
} else {
|
||||
static const QRegExp aPattern("(audio/)(ogg|flac|wav|mpeg|mp3)$", Qt::CaseInsensitive);
|
||||
match = aPattern.indexIn(mime.name());
|
||||
type = aPattern.capturedTexts().size() == 3 ? aPattern.capturedTexts()[1] : "";
|
||||
if (!type.isEmpty()) {
|
||||
return {
|
||||
|
|
Loading…
Add table
Reference in a new issue