Provided instance of Ui::Show to AddPermanentLinkBlock.

This commit is contained in:
23rd 2022-03-06 08:14:34 +03:00
parent c56c0e3232
commit f48cf2e27a
4 changed files with 6 additions and 1 deletions

View File

@ -896,6 +896,7 @@ void AddSinglePeerRow(
}
void AddPermanentLinkBlock(
std::shared_ptr<Ui::Show> show,
not_null<Ui::VerticalLayout*> container,
not_null<PeerData*> peer,
not_null<UserData*> admin,
@ -961,7 +962,7 @@ void AddPermanentLinkBlock(
value->current().link,
std::move(close));
});
Ui::show(
show->showBox(
Ui::MakeConfirmBox({
tr::lng_group_invite_about_new(tr::now),
done

View File

@ -17,6 +17,7 @@ struct InviteLink;
namespace Ui {
class VerticalLayout;
class Show;
} // namespace Ui
[[nodiscard]] bool IsExpiredLink(const Api::InviteLink &data, TimeId now);
@ -27,6 +28,7 @@ void AddSinglePeerRow(
rpl::producer<QString> status);
void AddPermanentLinkBlock(
std::shared_ptr<Ui::Show> show,
not_null<Ui::VerticalLayout*> container,
not_null<PeerData*> peer,
not_null<UserData*> admin,

View File

@ -899,6 +899,7 @@ void ManageInviteLinksBox(
AddSubsectionTitle(container, tr::lng_create_permanent_link_title());
AddPermanentLinkBlock(
std::make_shared<Ui::BoxShow>(box),
container,
peer,
admin,

View File

@ -587,6 +587,7 @@ object_ptr<Ui::RpWidget> Controller::createInviteLinkBlock() {
AddSubsectionTitle(container, tr::lng_create_permanent_link_title());
}
AddPermanentLinkBlock(
_show,
container,
_peer,
_peer->session().user(),