Removed observable in Intro::details::Step.

This commit is contained in:
23rd 2021-06-12 08:03:07 +03:00
parent 1c6e2eae04
commit e85026ec46
2 changed files with 10 additions and 9 deletions

View file

@ -75,15 +75,16 @@ Step::Step(
? st::introCoverDescription ? st::introCoverDescription
: st::introDescription)) { : st::introDescription)) {
hide(); hide();
subscribe(Window::Theme::Background(), [this]( base::ObservableViewer(
const Window::Theme::BackgroundUpdate &update) { *Window::Theme::Background()
if (update.paletteChanged()) { ) | rpl::filter([](const Window::Theme::BackgroundUpdate &update) {
return update.paletteChanged();
}) | rpl::start_with_next([=] {
if (!_coverMask.isNull()) { if (!_coverMask.isNull()) {
_coverMask = QPixmap(); _coverMask = QPixmap();
prepareCoverMask(); prepareCoverMask();
} }
} }, lifetime());
});
_errorText.value( _errorText.value(
) | rpl::start_with_next([=](const QString &text) { ) | rpl::start_with_next([=](const QString &text) {

View file

@ -31,7 +31,7 @@ struct Data;
enum class StackAction; enum class StackAction;
enum class Animate; enum class Animate;
class Step : public Ui::RpWidget, protected base::Subscriber { class Step : public Ui::RpWidget {
public: public:
Step( Step(
QWidget *parent, QWidget *parent,