Don't count muted channels towards unread state of category
This commit is contained in:
@@ -1320,6 +1320,7 @@ int DiscordClient::GetUnreadStateForChannel(Snowflake id) const noexcept {
|
|||||||
int DiscordClient::GetUnreadChannelsCountForCategory(Snowflake id) const noexcept {
|
int DiscordClient::GetUnreadChannelsCountForCategory(Snowflake id) const noexcept {
|
||||||
int result = 0;
|
int result = 0;
|
||||||
for (Snowflake channel_id : m_store.GetChannelIDsWithParentID(id)) {
|
for (Snowflake channel_id : m_store.GetChannelIDsWithParentID(id)) {
|
||||||
|
if (IsChannelMuted(channel_id)) continue;
|
||||||
const auto iter = m_unread.find(channel_id);
|
const auto iter = m_unread.find(channel_id);
|
||||||
if (iter == m_unread.end()) continue;
|
if (iter == m_unread.end()) continue;
|
||||||
result += 1;
|
result += 1;
|
||||||
|
Reference in New Issue
Block a user