From 207c00422861c91c553654a37c52e21f72c76cc2 Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Sat, 25 Dec 2021 03:07:11 -0500 Subject: take muted channels into account for unread guild indicator --- src/components/channelscellrenderer.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'src/components') diff --git a/src/components/channelscellrenderer.cpp b/src/components/channelscellrenderer.cpp index 788afdf..325d45a 100644 --- a/src/components/channelscellrenderer.cpp +++ b/src/components/channelscellrenderer.cpp @@ -250,20 +250,11 @@ void CellRendererChannels::render_vfunc_guild(const Cairo::RefPtr= 0) { - has_unread = true; - total_mentions += state; - } - } - if (!has_unread) return; + int total_mentions; + const auto has_unread = discord.GetUnreadStateForGuild(id, total_mentions); - if (!discord.IsGuildMuted(id)) { + if (has_unread && !discord.IsGuildMuted(id)) { cr->set_source_rgb(1.0, 1.0, 1.0); const auto x = background_area.get_x(); const auto y = background_area.get_y(); -- cgit v1.2.3