2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Make MTPstring and MTPvector value types.

Also move MTPstring implementation to QByteArray.
This commit is contained in:
John Preston
2017-03-10 22:46:28 +03:00
parent 1df955e30a
commit f2465eba73
41 changed files with 268 additions and 307 deletions

View File

@@ -2813,20 +2813,20 @@ void MediaView::userPhotosLoaded(UserData *u, const MTPphotos_Photos &photos, mt
_loadRequest = 0;
}
const QVector<MTPPhoto> *v = 0;
const QVector<MTPPhoto> *v = nullptr;
switch (photos.type()) {
case mtpc_photos_photos: {
const auto &d(photos.c_photos_photos());
auto &d = photos.c_photos_photos();
App::feedUsers(d.vusers);
v = &d.vphotos.c_vector().v;
v = &d.vphotos.v;
u->photosCount = 0;
} break;
case mtpc_photos_photosSlice: {
const auto &d(photos.c_photos_photosSlice());
auto &d = photos.c_photos_photosSlice();
App::feedUsers(d.vusers);
u->photosCount = d.vcount.v;
v = &d.vphotos.c_vector().v;
v = &d.vphotos.v;
} break;
default: return;