summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2022-05-02 02:38:41 -0400
committerouwou <26526779+ouwou@users.noreply.github.com>2022-05-02 02:38:41 -0400
commitb18b94818ae860f08ca606b2954bfcb4263b3ffb (patch)
treef29d6bdcd0f5334844bb5b70997923645b767731
parent63db16a711fa1f4127b11197940d47032867ec94 (diff)
downloadabaddon-portaudio-b18b94818ae860f08ca606b2954bfcb4263b3ffb.tar.gz
abaddon-portaudio-b18b94818ae860f08ca606b2954bfcb4263b3ffb.zip
respect muted state for tab indicator
-rw-r--r--src/components/channeltabswitcherhandy.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/components/channeltabswitcherhandy.cpp b/src/components/channeltabswitcherhandy.cpp
index 609d17c..f7b0226 100644
--- a/src/components/channeltabswitcherhandy.cpp
+++ b/src/components/channeltabswitcherhandy.cpp
@@ -119,7 +119,10 @@ int ChannelTabSwitcherHandy::GetNumberOfTabs() const {
void ChannelTabSwitcherHandy::CheckUnread(Snowflake id) {
if (auto it = m_pages.find(id); it != m_pages.end()) {
- hdy_tab_page_set_needs_attention(it->second, Abaddon::Get().GetDiscordClient().GetUnreadStateForChannel(id) > -1);
+ auto &discord = Abaddon::Get().GetDiscordClient();
+ const bool has_unreads = discord.GetUnreadStateForChannel(id) > -1;
+ const bool show_indicator = has_unreads && !discord.IsChannelMuted(id);
+ hdy_tab_page_set_needs_attention(it->second, show_indicator);
}
}