Attempt to fix monoforum muted setting.

This commit is contained in:
John Preston 2025-06-16 13:33:46 +04:00
parent b965aecc6c
commit b2d7342b9e
2 changed files with 14 additions and 2 deletions

View file

@ -878,6 +878,12 @@ Dialogs::BadgesState SavedSublist::chatListBadgesState() const {
> _parent->owningHistory()->inboxReadTillId());
result.unreadMuted = muted();
}
if (_parent->owningHistory()->muted()) {
result.unreadMuted
= result.mentionMuted
= result.reactionMuted
= true;
}
return result;
}

View file

@ -2358,8 +2358,14 @@ Dialogs::UnreadState History::chatListUnreadState() const {
if (const auto forum = peer->forum()) {
return AdjustedForumUnreadState(forum->topicsList()->unreadState());
} else if (const auto monoforum = peer->monoforum()) {
return AdjustedForumUnreadState(
monoforum->chatsList()->unreadState());
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 computeUnreadState();
}