From 15954830e278007fc8da209944d4422240d65ecc Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Fri, 10 Dec 2021 03:26:33 -0500 Subject: hide guild unread indicator for muted guilds --- src/components/unreadrenderer.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/components/unreadrenderer.cpp') diff --git a/src/components/unreadrenderer.cpp b/src/components/unreadrenderer.cpp index 4ac1739..26fb6b6 100644 --- a/src/components/unreadrenderer.cpp +++ b/src/components/unreadrenderer.cpp @@ -55,13 +55,15 @@ void UnreadRenderer::RenderUnreadOnGuild(Snowflake id, Gtk::Widget &widget, cons } if (!has_unread) return; - cr->set_source_rgb(1.0, 1.0, 1.0); - const auto x = background_area.get_x(); - const auto y = background_area.get_y(); - const auto w = background_area.get_width(); - const auto h = background_area.get_height(); - cr->rectangle(x, y + h / 2 - 24 / 2, 3, 24); - cr->fill(); + if (!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(); + const auto w = background_area.get_width(); + const auto h = background_area.get_height(); + cr->rectangle(x, y + h / 2 - 24 / 2, 3, 24); + cr->fill(); + } if (total_mentions < 1) return; auto *paned = static_cast(widget.get_ancestor(Gtk::Paned::get_type())); -- cgit v1.2.3