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

Method checkEmptyState

Telegram/SourceFiles/data/data_histories.cpp:752–764  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

750}
751
752void Histories::checkEmptyState(not_null<History*> history) {
753 const auto empty = [](const State &state) {
754 return state.postponed.empty()
755 && !state.postponedRequestEntry
756 && state.sent.empty()
757 && (state.willReadTill == 0)
758 && (state.sentReadTill == 0);
759 };
760 const auto i = _states.find(history);
761 if (i != end(_states) && empty(i->second)) {
762 _states.erase(i);
763 }
764}
765
766bool Histories::postponeHistoryRequest(const State &state) const {
767 const auto proj = [](const auto &pair) {

Callers

nothing calls this directly

Calls 3

emptyMethod · 0.45
findMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected