From 640b3537035ae45d2b6d31cd1c9d485d5cd63cfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Blin?= <sebastien.blin@savoirfairelinux.com> Date: Mon, 30 Jan 2023 14:43:15 -0500 Subject: [PATCH] chatview: re-show video and audio components Change-Id: I6c36ab045667d01859a72dfec12e3e02130c57fe GitLab: #947 --- src/app/messagesadapter.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/messagesadapter.cpp b/src/app/messagesadapter.cpp index 598c4109a..a56554abe 100644 --- a/src/app/messagesadapter.cpp +++ b/src/app/messagesadapter.cpp @@ -652,6 +652,7 @@ MessagesAdapter::getMediaInfo(const QString& msg) return fileInfo; } static const QRegExp vPattern("(video/)(avi|mov|webm|webp|rmvb)$", Qt::CaseInsensitive); + vPattern.indexIn(mime.name()); QString type = vPattern.capturedTexts().size() == 3 ? vPattern.capturedTexts()[1] : ""; if (!type.isEmpty()) { return { @@ -660,6 +661,7 @@ MessagesAdapter::getMediaInfo(const QString& msg) }; } else { static const QRegExp aPattern("(audio/)(ogg|flac|wav|mpeg|mp3)$", Qt::CaseInsensitive); + aPattern.indexIn(mime.name()); type = aPattern.capturedTexts().size() == 3 ? aPattern.capturedTexts()[1] : ""; if (!type.isEmpty()) { return { -- GitLab