mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-30 22:25:12 +00:00
Use getters in MTP classes.
This commit is contained in:
@@ -37,7 +37,7 @@ struct PreparedFileThumbnail {
|
||||
QString name;
|
||||
QImage image;
|
||||
QByteArray bytes;
|
||||
MTPPhotoSize mtpSize = MTP_photoSizeEmpty(MTP_string(""));
|
||||
MTPPhotoSize mtpSize = MTP_photoSizeEmpty(MTP_string());
|
||||
};
|
||||
|
||||
PreparedFileThumbnail PrepareFileThumbnail(QImage &&original) {
|
||||
@@ -67,7 +67,7 @@ PreparedFileThumbnail PrepareFileThumbnail(QImage &&original) {
|
||||
Qt::SmoothTransformation)
|
||||
: std::move(original);
|
||||
result.mtpSize = MTP_photoSize(
|
||||
MTP_string(""),
|
||||
MTP_string(),
|
||||
MTP_fileLocationToBeDeprecated(MTP_long(0), MTP_int(0)),
|
||||
MTP_int(result.image.width()),
|
||||
MTP_int(result.image.height()),
|
||||
@@ -216,7 +216,7 @@ SendMediaReady PreparePeerPhoto(PeerId peerId, QImage &&image) {
|
||||
MTP_flags(0),
|
||||
MTP_long(id),
|
||||
MTP_long(0),
|
||||
MTP_bytes(QByteArray()),
|
||||
MTP_bytes(),
|
||||
MTP_int(unixtime()),
|
||||
MTP_vector<MTPPhotoSize>(photoSizes),
|
||||
MTP_int(MTP::maindc()));
|
||||
@@ -279,7 +279,7 @@ SendMediaReady PrepareWallPaper(const QImage &image) {
|
||||
MTP_flags(0),
|
||||
MTP_long(id),
|
||||
MTP_long(0),
|
||||
MTP_bytes(QByteArray()),
|
||||
MTP_bytes(),
|
||||
MTP_int(unixtime()),
|
||||
MTP_string("image/jpeg"),
|
||||
MTP_int(jpeg.size()),
|
||||
@@ -471,7 +471,10 @@ void SendingAlbum::refreshMediaCaption(not_null<HistoryItem*> item) {
|
||||
return;
|
||||
}
|
||||
i->media = i->media->match([&](const MTPDinputSingleMedia &data) {
|
||||
return PrepareAlbumItemMedia(item, data.vmedia, data.vrandom_id.v);
|
||||
return PrepareAlbumItemMedia(
|
||||
item,
|
||||
data.vmedia(),
|
||||
data.vrandom_id().v);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -891,7 +894,7 @@ void FileLoadTask::process() {
|
||||
if (isSticker) {
|
||||
attributes.push_back(MTP_documentAttributeSticker(
|
||||
MTP_flags(0),
|
||||
MTP_string(QString()),
|
||||
MTP_string(),
|
||||
MTP_inputStickerSetEmpty(),
|
||||
MTPMaskCoords()));
|
||||
if (isAnimation) {
|
||||
@@ -925,7 +928,7 @@ void FileLoadTask::process() {
|
||||
MTP_flags(0),
|
||||
MTP_long(_id),
|
||||
MTP_long(0),
|
||||
MTP_bytes(QByteArray()),
|
||||
MTP_bytes(),
|
||||
MTP_int(unixtime()),
|
||||
MTP_vector<MTPPhotoSize>(photoSizes),
|
||||
MTP_int(MTP::maindc()));
|
||||
@@ -955,7 +958,7 @@ void FileLoadTask::process() {
|
||||
MTP_flags(0),
|
||||
MTP_long(_id),
|
||||
MTP_long(0),
|
||||
MTP_bytes(QByteArray()),
|
||||
MTP_bytes(),
|
||||
MTP_int(unixtime()),
|
||||
MTP_string(filemime),
|
||||
MTP_int(filesize),
|
||||
@@ -967,7 +970,7 @@ void FileLoadTask::process() {
|
||||
MTP_flags(0),
|
||||
MTP_long(_id),
|
||||
MTP_long(0),
|
||||
MTP_bytes(QByteArray()),
|
||||
MTP_bytes(),
|
||||
MTP_int(unixtime()),
|
||||
MTP_string(filemime),
|
||||
MTP_int(filesize),
|
||||
|
Reference in New Issue
Block a user