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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user