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

Fix muted state of monoforums.

This commit is contained in:
John Preston
2025-07-01 15:59:20 +04:00
parent eccfd75a83
commit 9b989329d4
3 changed files with 21 additions and 10 deletions

View File

@@ -2369,14 +2369,8 @@ Dialogs::UnreadState History::chatListUnreadState() const {
if (const auto forum = peer->forum()) {
return AdjustedForumUnreadState(forum->topicsList()->unreadState());
} else if (const auto monoforum = peer->monoforum()) {
auto state = monoforum->chatsList()->unreadState();
if (muted()) {
state.chatsMuted = state.chats;
state.marksMuted = state.marks;
state.messagesMuted = state.messages;
state.reactionsMuted = state.reactions;
}
return AdjustedForumUnreadState(state);
return AdjustedForumUnreadState(
monoforum->unreadStateWithParentMuted());
}
return computeUnreadState();
}
@@ -2391,9 +2385,9 @@ Dialogs::BadgesState History::chatListBadgesState() const {
} else if (const auto monoforum = peer->monoforum()) {
return adjustBadgesStateByFolder(
Dialogs::BadgesForUnread(
monoforum->chatsList()->unreadState(),
monoforum->unreadStateWithParentMuted(),
Dialogs::CountInBadge::Chats,
Dialogs::IncludeInBadge::UnmutedOrAll));
Dialogs::IncludeInBadge::All));
}
return computeBadgesState();
}