mirror of
https://github.com/celisej567/abaddon.git
synced 2026-09-19 20:11:59 +03:00
Show unread indicators next to categories containing unread channels
This commit is contained in:
@@ -1317,6 +1317,16 @@ int DiscordClient::GetUnreadStateForChannel(Snowflake id) const noexcept {
|
||||
return iter->second;
|
||||
}
|
||||
|
||||
int DiscordClient::GetUnreadChannelsCountForCategory(Snowflake id) const noexcept {
|
||||
int result = 0;
|
||||
for (Snowflake channel_id : m_store.GetChannelIDsWithParentID(id)) {
|
||||
const auto iter = m_unread.find(channel_id);
|
||||
if (iter == m_unread.end()) continue;
|
||||
result += 1;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
bool DiscordClient::GetUnreadStateForGuild(Snowflake id, int &total_mentions) const noexcept {
|
||||
total_mentions = 0;
|
||||
bool has_any_unread = false;
|
||||
|
||||
Reference in New Issue
Block a user