2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Use getters in MTP classes.

This commit is contained in:
John Preston
2019-07-05 15:38:38 +02:00
parent 3ca28c0cf9
commit 567bf60644
100 changed files with 2807 additions and 2672 deletions

View File

@@ -137,7 +137,7 @@ AdminLog::OwnedItem GenerateForwardedItem(
MTP_string(text),
MTPMessageMedia(),
MTPReplyMarkup(),
MTPnullEntities,
MTPVector<MTPMessageEntity>(),
MTPint(), // views
MTPint(), // edit_date
MTPstring(), // post_author
@@ -193,8 +193,8 @@ void BlockedBoxController::loadMoreRows() {
_loadRequestId = 0;
auto handleContactsBlocked = [](auto &list) {
Auth().data().processUsers(list.vusers);
return list.vblocked.v;
Auth().data().processUsers(list.vusers());
return list.vblocked().v;
};
switch (result.type()) {
case mtpc_contacts_blockedSlice: {
@@ -232,7 +232,7 @@ void BlockedBoxController::receivedUsers(const QVector<MTPContactBlocked> &resul
_offset += result.size();
for (const auto &item : result) {
item.match([&](const MTPDcontactBlocked &data) {
if (const auto user = Auth().data().userLoaded(data.vuser_id.v)) {
if (const auto user = Auth().data().userLoaded(data.vuser_id().v)) {
appendRow(user);
user->setIsBlocked(true);
}