diff --git a/Telegram/SourceFiles/calls/calls_instance.cpp b/Telegram/SourceFiles/calls/calls_instance.cpp index c3d379476a..c044c9d0db 100644 --- a/Telegram/SourceFiles/calls/calls_instance.cpp +++ b/Telegram/SourceFiles/calls/calls_instance.cpp @@ -206,6 +206,8 @@ void Instance::startOrJoinGroupCall( ? Group::ChooseJoinAsProcess::Context::JoinWithConfirm : peer->groupCall() ? Group::ChooseJoinAsProcess::Context::Join + : args.scheduleNeeded + ? Group::ChooseJoinAsProcess::Context::CreateScheduled : Group::ChooseJoinAsProcess::Context::Create; _chooseJoinAs->start(peer, context, [=](object_ptr box) { Ui::show(std::move(box), Ui::LayerOption::KeepOther); diff --git a/Telegram/SourceFiles/calls/group/calls_choose_join_as.cpp b/Telegram/SourceFiles/calls/group/calls_choose_join_as.cpp index 38974f3d8e..17a4533fab 100644 --- a/Telegram/SourceFiles/calls/group/calls_choose_join_as.cpp +++ b/Telegram/SourceFiles/calls/group/calls_choose_join_as.cpp @@ -243,7 +243,7 @@ void ChooseJoinAsBox( auto next = (context == Context::Switch) ? tr::lng_settings_save() : tr::lng_continue(); - if (context == Context::Create) { + if ((context == Context::Create) && !livestream) { const auto makeLink = [](const QString &text) { return Ui::Text::Link(text); }; @@ -346,7 +346,16 @@ void ChooseJoinAsProcess::start( _request = nullptr; }, _request->lifetime); - requestList(); + if (context == Context::CreateScheduled) { + auto box = Box( + ScheduleGroupCallBox, + JoinInfo{ .peer = peer, .joinAs = peer }, + [=](auto info) { finish(info); }); + _request->box = Ui::MakeWeak(box.data()); + showBox(std::move(box)); + } else { + requestList(); + } } void ChooseJoinAsProcess::requestList() { diff --git a/Telegram/SourceFiles/calls/group/calls_choose_join_as.h b/Telegram/SourceFiles/calls/group/calls_choose_join_as.h index 67d0056828..f078497c15 100644 --- a/Telegram/SourceFiles/calls/group/calls_choose_join_as.h +++ b/Telegram/SourceFiles/calls/group/calls_choose_join_as.h @@ -27,6 +27,7 @@ public: enum class Context { Create, + CreateScheduled, Join, JoinWithConfirm, Switch,