MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / getDifference

Method getDifference

Telegram/SourceFiles/api/api_updates.cpp:686–714  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

684}
685
686void Updates::getDifference() {
687 _getDifferenceTimeByPts = 0;
688
689 if (requestingDifference()) {
690 return;
691 }
692
693 _bySeqUpdates.clear();
694 _bySeqTimer.cancel();
695
696 _noUpdatesTimer.cancel();
697 _getDifferenceTimeAfterFail = 0;
698
699 _ptsWaiter.setRequesting(true);
700
701 api().request(MTPupdates_GetDifference(
702 MTP_flags(0),
703 MTP_int(_ptsWaiter.current()),
704 MTPint(), // pts_limit
705 MTPint(), // pts_total_limit
706 MTP_int(_updatesDate),
707 MTP_int(_updatesQts),
708 MTPint() // qts_limit
709 )).done([=](const MTPupdates_Difference &result) {
710 differenceDone(result);
711 }).fail([=](const MTP::Error &error) {
712 differenceFail(error);
713 }).send();
714}
715
716void Updates::getChannelDifference(
717 not_null<ChannelData*> channel,

Callers 2

startMtpMethod · 0.80
GenerateCodesFunction · 0.80

Calls 10

MTP_flagsFunction · 0.85
setRequestingMethod · 0.80
MTP_intFunction · 0.50
clearMethod · 0.45
cancelMethod · 0.45
sendMethod · 0.45
failMethod · 0.45
doneMethod · 0.45
requestMethod · 0.45
currentMethod · 0.45

Tested by

no test coverage detected