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

Method dialogEntryApplied

Telegram/SourceFiles/data/data_histories.cpp:463–483  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

461}
462
463void Histories::dialogEntryApplied(not_null<History*> history) {
464 const auto state = lookup(history);
465 if (state && state->postponedRequestEntry) {
466 return;
467 }
468 history->dialogEntryApplied();
469 if (const auto callbacks = _dialogRequestsPending.take(history)) {
470 for (const auto &callback : *callbacks) {
471 callback();
472 }
473 }
474 if (const auto callbacks = _dialogRequests.take(history)) {
475 for (const auto &callback : *callbacks) {
476 callback();
477 }
478 }
479 if (state && state->sentReadTill && state->sentReadDone) {
480 history->setInboxReadTill(base::take(state->sentReadTill));
481 checkEmptyState(history);
482 }
483}
484
485void Histories::applyPeerDialogs(const MTPmessages_PeerDialogs &dialogs) {
486 Expects(dialogs.type() == mtpc_messages_peerDialogs);

Callers

nothing calls this directly

Calls 2

takeMethod · 0.45
setInboxReadTillMethod · 0.45

Tested by

no test coverage detected