mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Replace non-started calls.
This commit is contained in:
@@ -669,7 +669,8 @@ bool Instance::inCall() const {
|
||||
return false;
|
||||
}
|
||||
const auto state = _currentCall->state();
|
||||
return (state != Call::State::Busy);
|
||||
return (state != Call::State::Busy)
|
||||
&& (state != Call::State::WaitingUserConfirmation);
|
||||
}
|
||||
|
||||
bool Instance::inGroupCall() const {
|
||||
|
||||
@@ -993,7 +993,12 @@ void Panel::paint(QRect clip) {
|
||||
|
||||
bool Panel::handleClose() const {
|
||||
if (_call) {
|
||||
window()->hide();
|
||||
if (_call->state() == Call::State::WaitingUserConfirmation
|
||||
|| _call->state() == Call::State::Busy) {
|
||||
_call->hangup();
|
||||
} else {
|
||||
window()->hide();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -1028,6 +1033,7 @@ void Panel::stateChanged(State state) {
|
||||
_startVideo = base::make_unique_q<Ui::CallButton>(
|
||||
widget(),
|
||||
st::callStartVideo);
|
||||
_startVideo->show();
|
||||
_startVideo->setText(tr::lng_call_start_video());
|
||||
_startVideo->clicks() | rpl::map_to(true) | rpl::start_to_stream(
|
||||
_startOutgoingRequests,
|
||||
|
||||
Reference in New Issue
Block a user