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

Method updateUnreadCounts

Telegram/SourceFiles/data/data_saved_messages.cpp:609–620  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

607}
608
609void SavedMessages::updateUnreadCounts(
610 MsgId readTillId,
611 const base::flat_map<not_null<SavedSublist*>, int> &counts) {
612 for (const auto &[peer, sublist] : _sublists) {
613 const auto raw = sublist.get();
614 const auto i = counts.find(raw);
615 const auto count = (i != end(counts)) ? i->second : 0;
616 if (raw->unreadCountCurrent() != count) {
617 raw->setInboxReadTill(readTillId, count);
618 }
619 }
620}
621
622rpl::producer<> SavedMessages::destroyed() const {
623 if (!_parentChat) {

Callers

nothing calls this directly

Calls 4

getMethod · 0.45
findMethod · 0.45
unreadCountCurrentMethod · 0.45
setInboxReadTillMethod · 0.45

Tested by

no test coverage detected