diff --git a/Telegram/SourceFiles/intro/intro_step.cpp b/Telegram/SourceFiles/intro/intro_step.cpp index 7606c30efd..83a62e99d3 100644 --- a/Telegram/SourceFiles/intro/intro_step.cpp +++ b/Telegram/SourceFiles/intro/intro_step.cpp @@ -75,15 +75,16 @@ Step::Step( ? st::introCoverDescription : st::introDescription)) { hide(); - subscribe(Window::Theme::Background(), [this]( - const Window::Theme::BackgroundUpdate &update) { - if (update.paletteChanged()) { - if (!_coverMask.isNull()) { - _coverMask = QPixmap(); - prepareCoverMask(); - } + base::ObservableViewer( + *Window::Theme::Background() + ) | rpl::filter([](const Window::Theme::BackgroundUpdate &update) { + return update.paletteChanged(); + }) | rpl::start_with_next([=] { + if (!_coverMask.isNull()) { + _coverMask = QPixmap(); + prepareCoverMask(); } - }); + }, lifetime()); _errorText.value( ) | rpl::start_with_next([=](const QString &text) { diff --git a/Telegram/SourceFiles/intro/intro_step.h b/Telegram/SourceFiles/intro/intro_step.h index b98349a449..4a590a93ec 100644 --- a/Telegram/SourceFiles/intro/intro_step.h +++ b/Telegram/SourceFiles/intro/intro_step.h @@ -31,7 +31,7 @@ struct Data; enum class StackAction; enum class Animate; -class Step : public Ui::RpWidget, protected base::Subscriber { +class Step : public Ui::RpWidget { public: Step( QWidget *parent,