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

Remove some usages of App::main().

This commit is contained in:
John Preston
2020-06-10 22:08:17 +04:00
parent ea86433be5
commit ee43027bea
53 changed files with 518 additions and 429 deletions

View File

@@ -681,8 +681,8 @@ rpl::producer<QString> CallsPeer2PeerPrivacyController::exceptionsDescription()
}
ForwardsPrivacyController::ForwardsPrivacyController(
not_null<::Main::Session*> session)
: _session(session) {
not_null<Window::SessionController*> controller)
: _controller(controller) {
}
ApiWrap::Privacy::Key ForwardsPrivacyController::key() {
@@ -735,7 +735,7 @@ object_ptr<Ui::RpWidget> ForwardsPrivacyController::setupAboveWidget(
auto message = GenerateForwardedItem(
delegate(),
_session->data().history(
_controller->session().data().history(
peerFromUser(PeerData::kServiceNotificationsId)),
tr::lng_edit_privacy_forwards_sample_message(tr::now));
const auto view = message.get();
@@ -760,7 +760,7 @@ object_ptr<Ui::RpWidget> ForwardsPrivacyController::setupAboveWidget(
widget->paintRequest(
) | rpl::start_with_next([=](QRect rect) {
Window::SectionWidget::PaintBackground(widget, rect);
Window::SectionWidget::PaintBackground(_controller, widget, rect);
Painter p(widget);
p.translate(0, padding + view->marginBottom());