2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 22:55:11 +00:00

Fix RTMP livestream starting while in another call.

Fixes #24862.
This commit is contained in:
John Preston
2022-08-08 16:39:44 +03:00
parent 068eb3fcd1
commit 3a3341fef8
5 changed files with 41 additions and 35 deletions

View File

@@ -1276,12 +1276,15 @@ void SessionController::startOrJoinGroupCall(
const Calls::StartGroupCallArgs &args) {
using JoinConfirm = Calls::StartGroupCallArgs::JoinConfirm;
auto &calls = Core::App().calls();
auto confirmedArgs = args;
confirmedArgs.confirm = JoinConfirm::None;
const auto askConfirmation = [&](QString text, QString button) {
show(Ui::MakeConfirmBox({
.text = text,
.confirmed = crl::guard(this,[=, hash = args.joinHash] {
.confirmed = crl::guard(this,[=] {
hideLayer();
startOrJoinGroupCall(peer, { hash, JoinConfirm::None });
startOrJoinGroupCall(peer, confirmedArgs);
}),
.confirmText = button,
}));
@@ -1300,10 +1303,7 @@ void SessionController::startOrJoinGroupCall(
if (now == peer) {
calls.activateCurrentCall(args.joinHash);
} else if (calls.currentGroupCall()->scheduleDate()) {
calls.startOrJoinGroupCall(
std::make_shared<Show>(this),
peer,
{args.joinHash});
startOrJoinGroupCall(peer, confirmedArgs);
} else {
askConfirmation(
((peer->isBroadcast() && now->isBroadcast())
@@ -1316,7 +1316,7 @@ void SessionController::startOrJoinGroupCall(
tr::lng_group_call_leave(tr::now));
}
} else {
calls.startOrJoinGroupCall(
calls.showStartOrJoinGroupCall(
std::make_shared<Show>(this),
peer,
args);