2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Moved searching of sticker mimes to single place.

This commit is contained in:
23rd
2020-01-07 13:41:13 +03:00
committed by John Preston
parent f3595e379c
commit d1d5312ead
7 changed files with 17 additions and 20 deletions

View File

@@ -102,4 +102,9 @@ MimeType MimeTypeForData(const QByteArray &data) {
return MimeType(QMimeDatabase().mimeTypeForData(data));
}
bool IsMimeSticker(const QString &mime) {
return mime == qsl("image/webp")
|| mime == qsl("application/x-tgsticker");
}
} // namespace Core

View File

@@ -39,4 +39,6 @@ MimeType MimeTypeForName(const QString &mime);
MimeType MimeTypeForFile(const QFileInfo &file);
MimeType MimeTypeForData(const QByteArray &data);
bool IsMimeSticker(const QString &mime);
} // namespace Core