From b2d7342b9e5652e8fddb15d91ed89db1cad04f6e Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 16 Jun 2025 13:33:46 +0400 Subject: [PATCH] Attempt to fix monoforum muted setting. --- Telegram/SourceFiles/data/data_saved_sublist.cpp | 6 ++++++ Telegram/SourceFiles/history/history.cpp | 10 ++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/data/data_saved_sublist.cpp b/Telegram/SourceFiles/data/data_saved_sublist.cpp index c8271b6824..488eab3a1a 100644 --- a/Telegram/SourceFiles/data/data_saved_sublist.cpp +++ b/Telegram/SourceFiles/data/data_saved_sublist.cpp @@ -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; } diff --git a/Telegram/SourceFiles/history/history.cpp b/Telegram/SourceFiles/history/history.cpp index 367cde6421..5227ae17a7 100644 --- a/Telegram/SourceFiles/history/history.cpp +++ b/Telegram/SourceFiles/history/history.cpp @@ -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(); }