| 62 | } |
| 63 | |
| 64 | void 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 | |
| 79 | void UnreadThings::preloadEnoughMentions(not_null<Data::Thread*> thread) { |
| 80 | const auto fullCount = thread->unreadMentions().count(); |
no test coverage detected