mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Track unread mentions and unread reactions the same way.
This commit is contained in:
@@ -1303,7 +1303,14 @@ void Session::photoLoadFail(
|
||||
void Session::markMediaRead(not_null<const DocumentData*> document) {
|
||||
const auto i = _documentItems.find(document);
|
||||
if (i != end(_documentItems)) {
|
||||
_session->api().markMediaRead({ begin(i->second), end(i->second) });
|
||||
auto items = base::flat_set<not_null<HistoryItem*>>();
|
||||
items.reserve(i->second.size());
|
||||
for (const auto &item : i->second) {
|
||||
if (item->isUnreadMention() || item->isIncomingUnreadMedia()) {
|
||||
items.emplace(item);
|
||||
}
|
||||
}
|
||||
_session->api().markContentsRead(items);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user