Replaced Info::Controller with navigation in box for giveaway creation.

This commit is contained in:
23rd 2024-08-27 09:01:19 +03:00
parent 6a43f2e508
commit 07c5e6542b
2 changed files with 7 additions and 7 deletions

View file

@ -237,13 +237,13 @@ void AddPremiumTopBarWithDefaultTitleBar(
void CreateGiveawayBox(
not_null<Ui::GenericBox*> box,
not_null<Info::Controller*> controller,
not_null<Window::SessionNavigation*> navigation,
not_null<PeerData*> peer,
Fn<void()> reloadOnDone,
std::optional<Data::BoostPrepaidGiveaway> prepaid) {
box->setWidth(st::boxWideWidth);
const auto weakWindow = base::make_weak(controller->parentController());
const auto weakWindow = base::make_weak(navigation->parentController());
using GiveawayType = Giveaway::GiveawayTypeRow::Type;
using GiveawayGroup = Ui::RadioenumGroup<GiveawayType>;
@ -384,7 +384,7 @@ void CreateGiveawayBox(
using Controller = Giveaway::AwardMembersListController;
auto listController = std::make_unique<Controller>(
controller,
navigation,
peer,
state->selectedToAward);
listController->setCheckError(CreateErrorCallback(

View file

@ -13,9 +13,9 @@ namespace Data {
struct BoostPrepaidGiveaway;
} // namespace Data
namespace Info {
class Controller;
} // namespace Info
namespace Window {
class SessionNavigation;
} // namespace Window
namespace Ui {
class GenericBox;
@ -23,7 +23,7 @@ class GenericBox;
void CreateGiveawayBox(
not_null<Ui::GenericBox*> box,
not_null<Info::Controller*> controller,
not_null<Window::SessionNavigation*> navigation,
not_null<PeerData*> peer,
Fn<void()> reloadOnDone,
std::optional<Data::BoostPrepaidGiveaway> prepaidGiveaway);