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

Don't decline awaited incoming call on app quit.

This commit is contained in:
John Preston
2017-05-08 12:26:43 +03:00
parent 530a385d4e
commit e7dcd5ab15
4 changed files with 13 additions and 5 deletions

View File

@@ -318,7 +318,7 @@ void Panel::initControls() {
auto state = _call->state();
if (state == State::Busy) {
_call->redial();
} else if ((_call->type() == Call::Type::Incoming) && ((state == State::Starting) || (state == State::WaitingIncoming))) {
} else if (_call->isIncomingWaiting()) {
_call->answer();
} else {
_call->hangup();
@@ -702,11 +702,11 @@ void Panel::stateChanged(State state) {
button->toggleAnimated(visible);
}
};
auto waitingIncoming = (_call->type() == Call::Type::Incoming) && ((state == State::Starting) || (state == State::WaitingIncoming));
if (waitingIncoming) {
auto incomingWaiting = _call->isIncomingWaiting();
if (incomingWaiting) {
_updateOuterRippleTimer.callEach(Call::kSoundSampleMs);
}
toggleButton(_decline, waitingIncoming);
toggleButton(_decline, incomingWaiting);
toggleButton(_cancel, (state == State::Busy));
auto hangupShown = _decline->isHiddenOrHiding() && _cancel->isHiddenOrHiding();
if (_hangupShown != hangupShown) {