diff --git a/Telegram/SourceFiles/intro/intro_phone.cpp b/Telegram/SourceFiles/intro/intro_phone.cpp index 54a7c2cfe5..0d9dffd448 100644 --- a/Telegram/SourceFiles/intro/intro_phone.cpp +++ b/Telegram/SourceFiles/intro/intro_phone.cpp @@ -69,7 +69,10 @@ PhoneWidget::PhoneWidget( setTitleText(tr::lng_phone_title()); setDescriptionText(tr::lng_phone_desc()); - subscribe(getData()->updated, [=] { countryChanged(); }); + getData()->updated.events( + ) | rpl::start_with_next([=] { + countryChanged(); + }, lifetime()); setErrorCentered(true); setupQrLogin(); diff --git a/Telegram/SourceFiles/intro/intro_widget.cpp b/Telegram/SourceFiles/intro/intro_widget.cpp index 60069279ba..8e262f4920 100644 --- a/Telegram/SourceFiles/intro/intro_widget.cpp +++ b/Telegram/SourceFiles/intro/intro_widget.cpp @@ -566,7 +566,7 @@ void Widget::getNearestDC() { const auto nearestCountry = qs(nearest.vcountry()); if (getData()->country != nearestCountry) { getData()->country = nearestCountry; - getData()->updated.notify(); + getData()->updated.fire({}); } }).send(); } diff --git a/Telegram/SourceFiles/intro/intro_widget.h b/Telegram/SourceFiles/intro/intro_widget.h index 59be97a2ed..5430d2598c 100644 --- a/Telegram/SourceFiles/intro/intro_widget.h +++ b/Telegram/SourceFiles/intro/intro_widget.h @@ -59,7 +59,7 @@ struct Data { Window::TermsLock termsLock; - base::Observable updated; + rpl::event_stream<> updated; };