2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-03 08:05:12 +00:00

Show non-read non-opened topics as unread.

This commit is contained in:
John Preston
2022-11-15 19:12:03 +04:00
parent bc5aa7338e
commit ce631436bf
2 changed files with 8 additions and 2 deletions

View File

@@ -743,10 +743,15 @@ Dialogs::UnreadState ForumTopic::chatListUnreadState() const {
}
Dialogs::BadgesState ForumTopic::chatListBadgesState() const {
return Dialogs::BadgesForUnread(
auto result = Dialogs::BadgesForUnread(
chatListUnreadState(),
Dialogs::CountInBadge::Messages,
Dialogs::IncludeInBadge::All);
if (!result.unread && _replies->inboxReadTillId() < 2) {
result.unread = channel()->amIn()
&& (_lastKnownServerMessageId > history()->inboxReadTillId());
}
return result;
}
Dialogs::UnreadState ForumTopic::unreadStateFor(