2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Add group call settings box.

This commit is contained in:
John Preston
2020-11-28 19:18:51 +03:00
parent abb81c764e
commit 9e5006dd67
11 changed files with 369 additions and 219 deletions

View File

@@ -952,13 +952,14 @@ void MainWidget::setCurrentCall(Calls::Call *call) {
_currentCallLifetime.destroy();
_currentCall = call;
if (_currentCall) {
_callTopBar.destroy();
_currentCall->stateValue(
) | rpl::start_with_next([=](Calls::Call::State state) {
using State = Calls::Call::State;
if (state == State::Established) {
createCallTopBar();
} else {
if (state != State::Established) {
destroyCallTopBar();
} else if (!_callTopBar) {
createCallTopBar();
}
}, _currentCallLifetime);
} else {
@@ -973,13 +974,14 @@ void MainWidget::setCurrentGroupCall(Calls::GroupCall *call) {
_currentCallLifetime.destroy();
_currentGroupCall = call;
if (_currentGroupCall) {
_callTopBar.destroy();
_currentGroupCall->stateValue(
) | rpl::start_with_next([=](Calls::GroupCall::State state) {
using State = Calls::GroupCall::State;
if (state == State::Joined || state == State::Connecting) {
createCallTopBar();
} else {
if (state != State::Joined && state != State::Connecting) {
destroyCallTopBar();
} else if (!_callTopBar) {
createCallTopBar();
}
}, _currentCallLifetime);
} else {