mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fix wrong non-album image size in send preview.
Regression was introduced in 84288112fc
.
This commit is contained in:
parent
d21418cf04
commit
8cbb1abff2
1 changed files with 5 additions and 2 deletions
|
@ -293,8 +293,11 @@ void PrepareDetails(PreparedFile &file, int previewWidth, int sideLimit) {
|
||||||
if (ValidPhotoForAlbum(*image, file.information->filemime)) {
|
if (ValidPhotoForAlbum(*image, file.information->filemime)) {
|
||||||
UpdateImageDetails(file, previewWidth, sideLimit);
|
UpdateImageDetails(file, previewWidth, sideLimit);
|
||||||
file.type = PreparedFile::Type::Photo;
|
file.type = PreparedFile::Type::Photo;
|
||||||
} else if (image->animated) {
|
} else {
|
||||||
file.type = PreparedFile::Type::None;
|
file.originalDimensions = image->data.size();
|
||||||
|
if (image->animated) {
|
||||||
|
file.type = PreparedFile::Type::None;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if (const auto video = std::get_if<Video>(
|
} else if (const auto video = std::get_if<Video>(
|
||||||
&file.information->media)) {
|
&file.information->media)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue