2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Update API scheme to layer 92.

This commit is contained in:
John Preston
2018-12-21 17:54:42 +04:00
parent 1f8626b383
commit 47edb71a68
7 changed files with 101 additions and 58 deletions

View File

@@ -233,6 +233,8 @@ Image ParseMaxImage(
auto maxArea = int64(0);
for (const auto &size : data.v) {
size.match([](const MTPDphotoSizeEmpty &) {
}, [](const MTPDphotoStrippedSize &) {
// Max image size should not be a stripped image.
}, [&](const auto &data) {
const auto area = data.vw.v * int64(data.vh.v);
if (area > maxArea) {
@@ -427,6 +429,9 @@ Document ParseDocument(
result.thumb = data.vthumb.match([](const MTPDphotoSizeEmpty &) {
return Image();
}, [](const MTPDphotoStrippedSize &) {
// For now stripped images are used only in photos.
return Image();
}, [&](const auto &data) {
auto result = Image();
result.width = data.vw.v;