diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2022-05-06 01:14:15 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2022-05-06 01:14:15 -0400 |
commit | 2c25319fb85e077f27c3a4cd0bfdc8f503c6020d (patch) | |
tree | e92422ddcb896fb6b5bb75576138100c4f32f43d /src/components/channels.cpp | |
parent | 7daa0a250c76247c883cf536a3d339016a3852b4 (diff) | |
download | abaddon-portaudio-2c25319fb85e077f27c3a4cd0bfdc8f503c6020d.tar.gz abaddon-portaudio-2c25319fb85e077f27c3a4cd0bfdc8f503c6020d.zip |
clear tabs when access lost, show blanks for missing channels
Diffstat (limited to 'src/components/channels.cpp')
-rw-r--r-- | src/components/channels.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/components/channels.cpp b/src/components/channels.cpp index 2b83eb0..4e2e4df 100644 --- a/src/components/channels.cpp +++ b/src/components/channels.cpp @@ -931,7 +931,10 @@ void ChannelList::OnChannelSubmenuPopup() { const auto iter = m_model->get_iter(m_path_for_menu); if (!iter) return; const auto id = static_cast<Snowflake>((*iter)[m_columns.m_id]); - if (Abaddon::Get().GetDiscordClient().IsChannelMuted(id)) + auto &discord = Abaddon::Get().GetDiscordClient(); + const auto perms = discord.HasChannelPermission(discord.GetUserData().ID, id, Permission::VIEW_CHANNEL); + m_menu_channel_open_tab.set_sensitive(perms); + if (discord.IsChannelMuted(id)) m_menu_channel_toggle_mute.set_label("Unmute"); else m_menu_channel_toggle_mute.set_label("Mute"); |