summaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2021-12-10 03:26:33 -0500
committerouwou <26526779+ouwou@users.noreply.github.com>2021-12-10 03:26:33 -0500
commit15954830e278007fc8da209944d4422240d65ecc (patch)
tree82c5dad6357a57a7301cee9ac7901c8c9a48ea24 /src/components
parent46ab760a56430463f216467ec227453402ed43de (diff)
downloadabaddon-portaudio-15954830e278007fc8da209944d4422240d65ecc.tar.gz
abaddon-portaudio-15954830e278007fc8da209944d4422240d65ecc.zip
hide guild unread indicator for muted guilds
Diffstat (limited to 'src/components')
-rw-r--r--src/components/unreadrenderer.cpp16
1 files changed, 9 insertions, 7 deletions
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<Gtk::Paned *>(widget.get_ancestor(Gtk::Paned::get_type()));