mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-30 14:17:45 +00:00
Show information about ForceMuted state.
This commit is contained in:
@@ -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(); });
|
||||
|
@@ -15,6 +15,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "ui/layers/generic_box.h"
|
||||
#include "ui/wrap/padding_wrap.h"
|
||||
#include "ui/text/format_values.h"
|
||||
#include "ui/toast/toast.h"
|
||||
#include "lang/lang_keys.h"
|
||||
#include "core/application.h"
|
||||
#include "calls/calls_call.h"
|
||||
@@ -239,7 +240,9 @@ void TopBar::initControls() {
|
||||
if (const auto call = _call.get()) {
|
||||
call->setMuted(!call->muted());
|
||||
} else if (const auto group = _groupCall.get()) {
|
||||
if (group->muted() != MuteState::ForceMuted) {
|
||||
if (group->muted() == MuteState::ForceMuted) {
|
||||
Ui::Toast::Show(tr::lng_group_call_force_muted(tr::now));
|
||||
} else {
|
||||
group->setMuted((group->muted() == MuteState::Muted)
|
||||
? MuteState::Active
|
||||
: MuteState::Muted);
|
||||
@@ -268,9 +271,7 @@ void TopBar::initControls() {
|
||||
if (isForceMuted) {
|
||||
_mute->clearState();
|
||||
}
|
||||
_mute->setAttribute(
|
||||
Qt::WA_TransparentForMouseEvents,
|
||||
isForceMuted);
|
||||
_mute->setPointerCursor(!isForceMuted);
|
||||
|
||||
const auto to = 1.;
|
||||
const auto from = _switchStateAnimation.animating()
|
||||
|
2
Telegram/ThirdParty/tgcalls
vendored
2
Telegram/ThirdParty/tgcalls
vendored
Submodule Telegram/ThirdParty/tgcalls updated: 905ed863c1...a21d24aeb7
Submodule Telegram/lib_ui updated: 300c5a9c66...3bd98ac564
Reference in New Issue
Block a user