2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Track unread mentions / reactions in topics.

This commit is contained in:
John Preston
2022-10-07 17:56:07 +04:00
parent 9348039313
commit 2c0b5b3210
22 changed files with 448 additions and 192 deletions

View File

@@ -916,11 +916,12 @@ void RowPainter::Paint(
? base::unixtime::parse(cloudDraft->date)
: QDateTime();
}();
const auto displayMentionBadge = history
&& history->unreadMentions().has();
const auto displayMentionBadge = (history
&& history->unreadMentions().has())
|| (topic && topic->unreadMentions().has());
const auto displayReactionBadge = !displayMentionBadge
&& history
&& history->unreadReactions().has();
&& ((history && history->unreadReactions().has())
|| (topic && topic->unreadReactions().has()));
const auto mentionOrReactionMuted = (entry->folder() != nullptr)
|| (!displayMentionBadge && unreadMuted);
const auto displayUnreadCounter = [&] {