2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Show information about ForceMuted state.

This commit is contained in:
John Preston
2020-12-16 15:29:15 +04:00
parent 29e7ea9b36
commit a85be4ccd0
4 changed files with 15 additions and 12 deletions

View File

@@ -343,13 +343,15 @@ void GroupPanel::endCall() {
void GroupPanel::initControls() {
_mute->clicks(
) | rpl::filter([=](Qt::MouseButton button) {
return (button == Qt::LeftButton)
&& _call
&& (_call->muted() != MuteState::ForceMuted);
return (button == Qt::LeftButton) && (_call != nullptr);
}) | rpl::start_with_next([=] {
_call->setMuted((_call->muted() == MuteState::Muted)
? MuteState::Active
: MuteState::Muted);
if (_call->muted() == MuteState::ForceMuted) {
_mute->shake();
} else {
_call->setMuted((_call->muted() == MuteState::Muted)
? MuteState::Active
: MuteState::Muted);
}
}, _mute->lifetime());
_hangup->setClickedCallback([=] { endCall(); });