mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-06 15:13:57 +02:00
Stop connecting sound when group call leave starts.
This commit is contained in:
parent
9a21d55de7
commit
a1957fe5c0
1 changed files with 9 additions and 1 deletions
|
@ -827,12 +827,15 @@ void GroupCall::setState(State state) {
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case State::HangingUp:
|
case State::HangingUp:
|
||||||
case State::FailedHangingUp:
|
case State::FailedHangingUp:
|
||||||
|
stopConnectingSound();
|
||||||
_delegate->groupCallPlaySound(Delegate::GroupCallSound::Ended);
|
_delegate->groupCallPlaySound(Delegate::GroupCallSound::Ended);
|
||||||
break;
|
break;
|
||||||
case State::Ended:
|
case State::Ended:
|
||||||
|
stopConnectingSound();
|
||||||
_delegate->groupCallFinished(this);
|
_delegate->groupCallFinished(this);
|
||||||
break;
|
break;
|
||||||
case State::Failed:
|
case State::Failed:
|
||||||
|
stopConnectingSound();
|
||||||
_delegate->groupCallFailed(this);
|
_delegate->groupCallFailed(this);
|
||||||
break;
|
break;
|
||||||
case State::Connecting:
|
case State::Connecting:
|
||||||
|
@ -844,7 +847,12 @@ void GroupCall::setState(State state) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void GroupCall::playConnectingSound() {
|
void GroupCall::playConnectingSound() {
|
||||||
if (_connectingSoundTimer.isActive()) {
|
const auto state = _state.current();
|
||||||
|
if (_connectingSoundTimer.isActive()
|
||||||
|
|| state == State::HangingUp
|
||||||
|
|| state == State::FailedHangingUp
|
||||||
|
|| state == State::Ended
|
||||||
|
|| state == State::Failed) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
playConnectingSoundOnce();
|
playConnectingSoundOnce();
|
||||||
|
|
Loading…
Add table
Reference in a new issue