2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Discard call in case of an error.

Also add a couple of call error messages.
This commit is contained in:
John Preston
2017-05-09 15:06:21 +03:00
parent 061bd109d2
commit c78cc331d1
4 changed files with 65 additions and 35 deletions

View File

@@ -694,7 +694,10 @@ void Panel::stateChanged(State state) {
updateStatusText(state);
if (_call) {
if ((state != State::HangingUp) && (state != State::Ended) && (state != State::Failed)) {
if ((state != State::HangingUp)
&& (state != State::Ended)
&& (state != State::FailedHangingUp)
&& (state != State::Failed)) {
auto toggleButton = [this](auto &&button, bool visible) {
if (isHidden()) {
button->toggleFast(visible);
@@ -765,6 +768,7 @@ void Panel::updateStatusText(State state) {
}
return lang(lng_call_status_ended);
} break;
case State::FailedHangingUp:
case State::Failed: return lang(lng_call_status_failed);
case State::HangingUp: return lang(lng_call_status_hanging);
case State::Ended: return lang(lng_call_status_ended);