summaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/channels.cpp12
-rw-r--r--src/components/channels.hpp2
2 files changed, 14 insertions, 0 deletions
diff --git a/src/components/channels.cpp b/src/components/channels.cpp
index e91ed92..d49afca 100644
--- a/src/components/channels.cpp
+++ b/src/components/channels.cpp
@@ -174,6 +174,8 @@ ChannelList::ChannelList()
discord.signal_removed_from_thread().connect(sigc::mem_fun(*this, &ChannelList::OnThreadRemoved));
discord.signal_guild_update().connect(sigc::mem_fun(*this, &ChannelList::UpdateGuild));
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));
}
void ChannelList::UsePanedHack(Gtk::Paned &paned) {
@@ -370,6 +372,16 @@ void ChannelList::DeleteThreadRow(Snowflake id) {
m_model->erase(iter);
}
+void ChannelList::OnChannelMute(Snowflake id) {
+ if (auto iter = GetIteratorForChannelFromID(id))
+ m_model->row_changed(m_model->get_path(iter), iter);
+}
+
+void ChannelList::OnChannelUnmute(Snowflake id) {
+ if (auto iter = GetIteratorForChannelFromID(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) {
diff --git a/src/components/channels.hpp b/src/components/channels.hpp
index 2f4d045..16e6360 100644
--- a/src/components/channels.hpp
+++ b/src/components/channels.hpp
@@ -37,6 +37,8 @@ protected:
void UpdateCreateChannel(const ChannelData &channel);
void UpdateGuild(Snowflake id);
void DeleteThreadRow(Snowflake id);
+ void OnChannelMute(Snowflake id);
+ void OnChannelUnmute(Snowflake id);
void OnThreadJoined(Snowflake id);
void OnThreadRemoved(Snowflake id);