mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-14 13:17:08 +02:00
Replace non-started calls.
This commit is contained in:
parent
03b6e2df17
commit
edc6cfe210
2 changed files with 9 additions and 2 deletions
|
@ -669,7 +669,8 @@ bool Instance::inCall() const {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const auto state = _currentCall->state();
|
const auto state = _currentCall->state();
|
||||||
return (state != Call::State::Busy);
|
return (state != Call::State::Busy)
|
||||||
|
&& (state != Call::State::WaitingUserConfirmation);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Instance::inGroupCall() const {
|
bool Instance::inGroupCall() const {
|
||||||
|
|
|
@ -993,7 +993,12 @@ void Panel::paint(QRect clip) {
|
||||||
|
|
||||||
bool Panel::handleClose() const {
|
bool Panel::handleClose() const {
|
||||||
if (_call) {
|
if (_call) {
|
||||||
window()->hide();
|
if (_call->state() == Call::State::WaitingUserConfirmation
|
||||||
|
|| _call->state() == Call::State::Busy) {
|
||||||
|
_call->hangup();
|
||||||
|
} else {
|
||||||
|
window()->hide();
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -1028,6 +1033,7 @@ void Panel::stateChanged(State state) {
|
||||||
_startVideo = base::make_unique_q<Ui::CallButton>(
|
_startVideo = base::make_unique_q<Ui::CallButton>(
|
||||||
widget(),
|
widget(),
|
||||||
st::callStartVideo);
|
st::callStartVideo);
|
||||||
|
_startVideo->show();
|
||||||
_startVideo->setText(tr::lng_call_start_video());
|
_startVideo->setText(tr::lng_call_start_video());
|
||||||
_startVideo->clicks() | rpl::map_to(true) | rpl::start_to_stream(
|
_startVideo->clicks() | rpl::map_to(true) | rpl::start_to_stream(
|
||||||
_startOutgoingRequests,
|
_startOutgoingRequests,
|
||||||
|
|
Loading…
Add table
Reference in a new issue