2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Replace TLHelp helpers with .match()

This commit is contained in:
John Preston
2019-01-10 15:15:13 +04:00
parent 9a60e744d3
commit dba9ca2084
9 changed files with 42 additions and 102 deletions

View File

@@ -12,8 +12,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "boxes/peers/add_participants_box.h"
#include "boxes/confirm_box.h"
#include "boxes/add_contact_box.h"
#include "core/tl_help.h"
#include "base/overload.h"
#include "auth_session.h"
#include "apiwrap.h"
#include "lang/lang_keys.h"
@@ -1705,8 +1703,7 @@ void ParticipantsBoxSearchController::searchDone(
}
_requestId = 0;
TLHelp::VisitChannelParticipants(result, base::overload([&](
const MTPDchannels_channelParticipants &data) {
result.match([&](const MTPDchannels_channelParticipants &data) {
auto &list = data.vparticipants.v;
if (list.size() < requestedCount) {
// We want cache to have full information about a query with small
@@ -1726,9 +1723,9 @@ void ParticipantsBoxSearchController::searchDone(
}
}
_offset += list.size();
}, [&](mtpTypeId type) {
}, [&](const MTPDchannels_channelParticipantsNotModified &) {
_allLoaded = true;
}));
});
delegate()->peerListSearchRefreshRows();
}