Don't count muted channels towards unread state of category

This commit is contained in:
Jerzy Kozera
2023-07-05 01:25:22 +02:00
parent bdad178c5d
commit 88da9e17b8

View File

@@ -1320,6 +1320,7 @@ int DiscordClient::GetUnreadStateForChannel(Snowflake id) const noexcept {
int DiscordClient::GetUnreadChannelsCountForCategory(Snowflake id) const noexcept {
int result = 0;
for (Snowflake channel_id : m_store.GetChannelIDsWithParentID(id)) {
if (IsChannelMuted(channel_id)) continue;
const auto iter = m_unread.find(channel_id);
if (iter == m_unread.end()) continue;
result += 1;