2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 22:46:10 +00:00

Update API scheme on layer 152.

This commit is contained in:
John Preston
2023-01-18 09:27:47 +04:00
parent ea4e2f0952
commit 826ec75c33
5 changed files with 58 additions and 24 deletions

View File

@@ -201,6 +201,8 @@ std::vector<UnavailableReason> ExtractUnavailableReasons(
const auto area = [](const MTPVideoSize &size) {
return size.match([](const MTPDvideoSize &data) {
return (data.vw().v * data.vh().v);
}, [](const MTPDvideoSizeEmojiMarkup &) {
return 0;
});
};
const auto thumbs = data.vvideo_thumbs();
@@ -2814,10 +2816,12 @@ void Session::photoApplyFields(
const auto area = [](const MTPVideoSize &size) {
return size.match([](const MTPDvideoSize &data) {
return data.vsize().v ? (data.vw().v * data.vh().v) : 0;
}, [](const MTPDvideoSizeEmojiMarkup &) {
return 0;
});
};
const auto type = [](const MTPVideoSize &size) {
return size.match([](const MTPDvideoSize &data) {
return size.match([](const auto &data) {
return data.vtype().v.isEmpty()
? char(0)
: data.vtype().v.front();
@@ -2860,8 +2864,9 @@ void Session::photoApplyFields(
? Images::FromVideoSize(_session, data, *videoLarge)
: ImageWithLocation()),
(videoLarge
? VideoStartTime(*videoLarge->match(
[](const auto &data) { return &data; }))
? videoLarge->match([](const MTPDvideoSize &data) {
return VideoStartTime(data);
}, [](const MTPDvideoSizeEmojiMarkup &) { return 0; })
: 0));
}
}