Skip to content
Snippets Groups Projects
Commit 640b3537 authored by Sébastien Blin's avatar Sébastien Blin
Browse files

chatview: re-show video and audio components

Change-Id: I6c36ab045667d01859a72dfec12e3e02130c57fe
GitLab: #947
parent feb53e61
No related branches found
No related tags found
No related merge requests found
......@@ -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 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment