Don't offer sending .pdf-s as photos.

This commit is contained in:
John Preston 2020-12-24 13:52:38 +04:00
parent 7d22c631ca
commit 0dc0f588c4
1 changed files with 3 additions and 1 deletions

View File

@ -38,7 +38,9 @@ bool HasExtensionFrom(const QString &file, const QStringList &extensions) {
bool ValidPhotoForAlbum(
const PreparedFileInformation::Image &image,
const QString &mime) {
if (image.animated || Core::IsMimeSticker(mime)) {
if (image.animated
|| Core::IsMimeSticker(mime)
|| (mime == u"application/pdf"_q)) {
return false;
}
const auto width = image.data.width();