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

Method mediaAndMentionsRead

Telegram/SourceFiles/api/api_unread_things.cpp:64–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64void UnreadThings::mediaAndMentionsRead(
65 const base::flat_set<MsgId> &readIds,
66 ChannelData *channel) {
67 for (const auto &msgId : readIds) {
68 _api->requestMessageData(channel, msgId, [=] {
69 const auto item = channel
70 ? _api->session().data().message(channel->id, msgId)
71 : _api->session().data().nonChannelMessage(msgId);
72 if (item && item->mentionsMe()) {
73 item->markMediaAndMentionRead();
74 }
75 });
76 }
77}
78
79void UnreadThings::preloadEnoughMentions(not_null<Data::Thread*> thread) {
80 const auto fullCount = thread->unreadMentions().count();

Callers 2

applyUpdateNoPtsCheckMethod · 0.80
feedUpdateMethod · 0.80

Calls 7

nonChannelMessageMethod · 0.80
mentionsMeMethod · 0.80
requestMessageDataMethod · 0.45
messageMethod · 0.45
dataMethod · 0.45
sessionMethod · 0.45

Tested by

no test coverage detected