2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Track mentions / reactions together with unread.

This commit is contained in:
John Preston
2022-10-20 12:57:12 +04:00
parent 5356f6cd2c
commit 4910a60499
22 changed files with 407 additions and 478 deletions

View File

@@ -112,8 +112,7 @@ void SetActionText(not_null<QAction*> action, rpl::producer<QString> &&text) {
}
[[nodiscard]] bool IsUnreadThread(not_null<Data::Thread*> thread) {
return (thread->chatListUnreadCount() > 0)
|| (thread->chatListUnreadMark());
return thread->chatListBadgesState().unread;
}
void MarkAsReadThread(not_null<Data::Thread*> thread) {
@@ -1739,7 +1738,7 @@ void MenuAddMarkAsReadChatListAction(
const PeerMenuCallback &addAction) {
// There is no async to make weak from controller.
const auto unreadState = list()->unreadState();
if (unreadState.empty()) {
if (!unreadState.messages && !unreadState.marks && !unreadState.chats) {
return;
}