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:
@@ -343,13 +343,15 @@ void GroupPanel::endCall() {
|
|||||||
void GroupPanel::initControls() {
|
void GroupPanel::initControls() {
|
||||||
_mute->clicks(
|
_mute->clicks(
|
||||||
) | rpl::filter([=](Qt::MouseButton button) {
|
) | rpl::filter([=](Qt::MouseButton button) {
|
||||||
return (button == Qt::LeftButton)
|
return (button == Qt::LeftButton) && (_call != nullptr);
|
||||||
&& _call
|
|
||||||
&& (_call->muted() != MuteState::ForceMuted);
|
|
||||||
}) | rpl::start_with_next([=] {
|
}) | rpl::start_with_next([=] {
|
||||||
_call->setMuted((_call->muted() == MuteState::Muted)
|
if (_call->muted() == MuteState::ForceMuted) {
|
||||||
? MuteState::Active
|
_mute->shake();
|
||||||
: MuteState::Muted);
|
} else {
|
||||||
|
_call->setMuted((_call->muted() == MuteState::Muted)
|
||||||
|
? MuteState::Active
|
||||||
|
: MuteState::Muted);
|
||||||
|
}
|
||||||
}, _mute->lifetime());
|
}, _mute->lifetime());
|
||||||
|
|
||||||
_hangup->setClickedCallback([=] { endCall(); });
|
_hangup->setClickedCallback([=] { endCall(); });
|
||||||
|
@@ -15,6 +15,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||||||
#include "ui/layers/generic_box.h"
|
#include "ui/layers/generic_box.h"
|
||||||
#include "ui/wrap/padding_wrap.h"
|
#include "ui/wrap/padding_wrap.h"
|
||||||
#include "ui/text/format_values.h"
|
#include "ui/text/format_values.h"
|
||||||
|
#include "ui/toast/toast.h"
|
||||||
#include "lang/lang_keys.h"
|
#include "lang/lang_keys.h"
|
||||||
#include "core/application.h"
|
#include "core/application.h"
|
||||||
#include "calls/calls_call.h"
|
#include "calls/calls_call.h"
|
||||||
@@ -239,7 +240,9 @@ void TopBar::initControls() {
|
|||||||
if (const auto call = _call.get()) {
|
if (const auto call = _call.get()) {
|
||||||
call->setMuted(!call->muted());
|
call->setMuted(!call->muted());
|
||||||
} else if (const auto group = _groupCall.get()) {
|
} 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)
|
group->setMuted((group->muted() == MuteState::Muted)
|
||||||
? MuteState::Active
|
? MuteState::Active
|
||||||
: MuteState::Muted);
|
: MuteState::Muted);
|
||||||
@@ -268,9 +271,7 @@ void TopBar::initControls() {
|
|||||||
if (isForceMuted) {
|
if (isForceMuted) {
|
||||||
_mute->clearState();
|
_mute->clearState();
|
||||||
}
|
}
|
||||||
_mute->setAttribute(
|
_mute->setPointerCursor(!isForceMuted);
|
||||||
Qt::WA_TransparentForMouseEvents,
|
|
||||||
isForceMuted);
|
|
||||||
|
|
||||||
const auto to = 1.;
|
const auto to = 1.;
|
||||||
const auto from = _switchStateAnimation.animating()
|
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