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::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) {

View File

@ -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,