diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2022-05-02 02:38:41 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2022-05-02 02:38:41 -0400 |
commit | b18b94818ae860f08ca606b2954bfcb4263b3ffb (patch) | |
tree | f29d6bdcd0f5334844bb5b70997923645b767731 /src/components/channeltabswitcherhandy.cpp | |
parent | 63db16a711fa1f4127b11197940d47032867ec94 (diff) | |
download | abaddon-portaudio-b18b94818ae860f08ca606b2954bfcb4263b3ffb.tar.gz abaddon-portaudio-b18b94818ae860f08ca606b2954bfcb4263b3ffb.zip |
respect muted state for tab indicator
Diffstat (limited to 'src/components/channeltabswitcherhandy.cpp')
-rw-r--r-- | src/components/channeltabswitcherhandy.cpp | 5 |
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); } } |