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

Method cancelRequest

Telegram/SourceFiles/data/data_histories.cpp:1219–1236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1217}
1218
1219void Histories::cancelRequest(int id) {
1220 if (!id) {
1221 return;
1222 } else if (_creatingTopicRequests.contains(id)) {
1223 cancelDelayedByTopicRequest(id);
1224 return;
1225 }
1226 const auto history = _historyByRequest.take(id);
1227 if (!history) {
1228 return;
1229 }
1230 const auto state = lookup(*history);
1231 if (!state) {
1232 return;
1233 }
1234 state->postponed.remove(id);
1235 finishSentRequest(*history, state, id);
1236}
1237
1238void Histories::cancelDelayedByTopicRequest(int id) {
1239 for (auto &[rootId, messages] : _creatingTopics) {

Callers 11

requestMoreMethod · 0.45
~ForumMethod · 0.45
~RepliesListMethod · 0.45
loadAroundMethod · 0.45
loadBeforeMethod · 0.45
clearMethod · 0.45
~SavedSublistMethod · 0.45
loadAroundMethod · 0.45
loadBeforeMethod · 0.45
~MessagesSearchMethod · 0.45
cancelSearchRequestMethod · 0.45

Calls 3

containsMethod · 0.45
takeMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected