mirror of
https://github.com/uowuo/abaddon.git
synced 2026-08-15 05:19:58 +00:00
restore mute + deaf buttons on window popup
This commit is contained in:
1 parent
a24d83feac
commit
2c45972862
1 file changed
+5
@@ -103,6 +103,11 @@ VoiceWindow::VoiceWindow(Snowflake channel_id)
|
||||
discord.signal_voice_user_disconnect().connect(sigc::mem_fun(*this, &VoiceWindow::OnUserDisconnect));
|
||||
discord.signal_voice_user_connect().connect(sigc::mem_fun(*this, &VoiceWindow::OnUserConnect));
|
||||
|
||||
if (const auto self_state = discord.GetVoiceState(discord.GetUserData().ID); self_state.has_value()) {
|
||||
m_mute.set_active((self_state->second & VoiceStateFlags::SelfMute) == VoiceStateFlags::SelfMute);
|
||||
m_deafen.set_active((self_state->second & VoiceStateFlags::SelfDeaf) == VoiceStateFlags::SelfDeaf);
|
||||
}
|
||||
|
||||
m_mute.signal_toggled().connect(sigc::mem_fun(*this, &VoiceWindow::OnMuteChanged));
|
||||
m_deafen.signal_toggled().connect(sigc::mem_fun(*this, &VoiceWindow::OnDeafenChanged));
|
||||
|
||||
|
||||
Reference in new issue
Block a user