2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-05 00:55:12 +00:00

Update API scheme to layer 128.

This commit is contained in:
John Preston
2021-03-30 12:16:05 +04:00
parent c7a1771dec
commit 3ec3f6484f
24 changed files with 172 additions and 202 deletions

View File

@@ -79,7 +79,6 @@ PreparedFileThumbnail PrepareFileThumbnail(QImage &&original) {
: std::move(original);
result.mtpSize = MTP_photoSize(
MTP_string(),
MTP_fileLocationToBeDeprecated(MTP_long(0), MTP_int(0)),
MTP_int(result.image.width()),
MTP_int(result.image.height()),
MTP_int(0));
@@ -210,7 +209,6 @@ SendMediaReady PreparePeerPhoto(MTP::DcId dcId, PeerId peerId, QImage &&image) {
QByteArray bytes = QByteArray()) {
photoSizes.push_back(MTP_photoSize(
MTP_string(type),
MTP_fileLocationToBeDeprecated(MTP_long(0), MTP_int(0)),
MTP_int(image.width()),
MTP_int(image.height()), MTP_int(0)));
photoThumbs.emplace(type[0], PreparedPhotoThumb{
@@ -887,13 +885,13 @@ void FileLoadTask::process(Args &&args) {
writer.write(full);
}
photoThumbs.emplace('m', PreparedPhotoThumb{ .image = medium });
photoSizes.push_back(MTP_photoSize(MTP_string("m"), MTP_fileLocationToBeDeprecated(MTP_long(0), MTP_int(0)), MTP_int(medium.width()), MTP_int(medium.height()), MTP_int(0)));
photoSizes.push_back(MTP_photoSize(MTP_string("m"), MTP_int(medium.width()), MTP_int(medium.height()), MTP_int(0)));
photoThumbs.emplace('y', PreparedPhotoThumb{
.image = full,
.bytes = filedata
});
photoSizes.push_back(MTP_photoSize(MTP_string("y"), MTP_fileLocationToBeDeprecated(MTP_long(0), MTP_int(0)), MTP_int(full.width()), MTP_int(full.height()), MTP_int(0)));
photoSizes.push_back(MTP_photoSize(MTP_string("y"), MTP_int(full.width()), MTP_int(full.height()), MTP_int(0)));
photo = MTP_photo(
MTP_flags(0),