| 461 | } |
| 462 | |
| 463 | void 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 | |
| 485 | void Histories::applyPeerDialogs(const MTPmessages_PeerDialogs &dialogs) { |
| 486 | Expects(dialogs.type() == mtpc_messages_peerDialogs); |
nothing calls this directly
no test coverage detected