summaryrefslogtreecommitdiff
path: root/src/components/channels.cpp
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2021-12-29 23:51:12 -0500
committerouwou <26526779+ouwou@users.noreply.github.com>2021-12-29 23:51:12 -0500
commitea7464722b00501e077b4cb8ae267200ee6df220 (patch)
tree1bc6880a1814eb3b45230093cd98e72e63a07c53 /src/components/channels.cpp
parentd6da646d879a1b7f0ea2d09db2b266e3b6d0f3fa (diff)
downloadabaddon-portaudio-ea7464722b00501e077b4cb8ae267200ee6df220.tar.gz
abaddon-portaudio-ea7464722b00501e077b4cb8ae267200ee6df220.zip
handle change of mute state for guilds
Diffstat (limited to 'src/components/channels.cpp')
-rw-r--r--src/components/channels.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/components/channels.cpp b/src/components/channels.cpp
index c6606e4..b631023 100644
--- a/src/components/channels.cpp
+++ b/src/components/channels.cpp
@@ -186,6 +186,8 @@ ChannelList::ChannelList()
discord.signal_message_ack().connect(sigc::mem_fun(*this, &ChannelList::OnMessageAck));
discord.signal_channel_muted().connect(sigc::mem_fun(*this, &ChannelList::OnChannelMute));
discord.signal_channel_unmuted().connect(sigc::mem_fun(*this, &ChannelList::OnChannelUnmute));
+ discord.signal_guild_muted().connect(sigc::mem_fun(*this, &ChannelList::OnGuildMute));
+ discord.signal_guild_unmuted().connect(sigc::mem_fun(*this, &ChannelList::OnGuildUnmute));
}
void ChannelList::UsePanedHack(Gtk::Paned &paned) {
@@ -392,6 +394,16 @@ void ChannelList::OnChannelUnmute(Snowflake id) {
m_model->row_changed(m_model->get_path(iter), iter);
}
+void ChannelList::OnGuildMute(Snowflake id) {
+ if (auto iter = GetIteratorForGuildFromID(id))
+ m_model->row_changed(m_model->get_path(iter), iter);
+}
+
+void ChannelList::OnGuildUnmute(Snowflake id) {
+ if (auto iter = GetIteratorForGuildFromID(id))
+ m_model->row_changed(m_model->get_path(iter), iter);
+}
+
// create a temporary channel row for non-joined threads
// and delete them when the active channel switches off of them if still not joined
void ChannelList::SetActiveChannel(Snowflake id) {