mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Removed sound for cancel of unconfirmed peer calls.
This commit is contained in:
parent
4838315ca7
commit
582df3f39f
1 changed files with 7 additions and 4 deletions
|
@ -1039,14 +1039,15 @@ bool Call::checkCallFields(const MTPDphoneCallAccepted &call) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Call::setState(State state) {
|
void Call::setState(State state) {
|
||||||
if (_state.current() == State::Failed) {
|
const auto was = _state.current();
|
||||||
|
if (was == State::Failed) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (_state.current() == State::FailedHangingUp
|
if (was == State::FailedHangingUp
|
||||||
&& state != State::Failed) {
|
&& state != State::Failed) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (_state.current() != state) {
|
if (was != state) {
|
||||||
_state = state;
|
_state = state;
|
||||||
|
|
||||||
if (true
|
if (true
|
||||||
|
@ -1074,7 +1075,9 @@ void Call::setState(State state) {
|
||||||
_delegate->callPlaySound(Delegate::CallSound::Connecting);
|
_delegate->callPlaySound(Delegate::CallSound::Connecting);
|
||||||
break;
|
break;
|
||||||
case State::Ended:
|
case State::Ended:
|
||||||
_delegate->callPlaySound(Delegate::CallSound::Ended);
|
if (was != State::WaitingUserConfirmation) {
|
||||||
|
_delegate->callPlaySound(Delegate::CallSound::Ended);
|
||||||
|
}
|
||||||
[[fallthrough]];
|
[[fallthrough]];
|
||||||
case State::EndedByOtherDevice:
|
case State::EndedByOtherDevice:
|
||||||
_delegate->callFinished(this);
|
_delegate->callFinished(this);
|
||||||
|
|
Loading…
Add table
Reference in a new issue