parent
e8affa85b0
commit
ce1b94eb16
|
@ -875,7 +875,8 @@ void FileLoadTask::process(Args &&args) {
|
||||||
}
|
}
|
||||||
} else if (isAnimation) {
|
} else if (isAnimation) {
|
||||||
attributes.push_back(MTP_documentAttributeAnimated());
|
attributes.push_back(MTP_documentAttributeAnimated());
|
||||||
} else if (_type != SendMediaType::File) {
|
} else if (filemime.startsWith(u"image/"_q)
|
||||||
|
&& _type != SendMediaType::File) {
|
||||||
auto medium = (w > 320 || h > 320) ? fullimage.scaled(320, 320, Qt::KeepAspectRatio, Qt::SmoothTransformation) : fullimage;
|
auto medium = (w > 320 || h > 320) ? fullimage.scaled(320, 320, Qt::KeepAspectRatio, Qt::SmoothTransformation) : fullimage;
|
||||||
auto full = (w > 1280 || h > 1280) ? fullimage.scaled(1280, 1280, Qt::KeepAspectRatio, Qt::SmoothTransformation) : fullimage;
|
auto full = (w > 1280 || h > 1280) ? fullimage.scaled(1280, 1280, Qt::KeepAspectRatio, Qt::SmoothTransformation) : fullimage;
|
||||||
{
|
{
|
||||||
|
|
|
@ -40,7 +40,7 @@ bool ValidPhotoForAlbum(
|
||||||
const QString &mime) {
|
const QString &mime) {
|
||||||
if (image.animated
|
if (image.animated
|
||||||
|| Core::IsMimeSticker(mime)
|
|| Core::IsMimeSticker(mime)
|
||||||
|| (mime == u"application/pdf"_q)) {
|
|| !mime.startsWith(u"image/")) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const auto width = image.data.width();
|
const auto width = image.data.width();
|
||||||
|
|
Loading…
Reference in New Issue