mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 07:33:52 +02:00
Replaced observable in Intro::details::Data with rpl.
This commit is contained in:
parent
0fe7c07007
commit
2c50d3d87b
3 changed files with 6 additions and 3 deletions
|
@ -69,7 +69,10 @@ PhoneWidget::PhoneWidget(
|
||||||
|
|
||||||
setTitleText(tr::lng_phone_title());
|
setTitleText(tr::lng_phone_title());
|
||||||
setDescriptionText(tr::lng_phone_desc());
|
setDescriptionText(tr::lng_phone_desc());
|
||||||
subscribe(getData()->updated, [=] { countryChanged(); });
|
getData()->updated.events(
|
||||||
|
) | rpl::start_with_next([=] {
|
||||||
|
countryChanged();
|
||||||
|
}, lifetime());
|
||||||
setErrorCentered(true);
|
setErrorCentered(true);
|
||||||
setupQrLogin();
|
setupQrLogin();
|
||||||
|
|
||||||
|
|
|
@ -566,7 +566,7 @@ void Widget::getNearestDC() {
|
||||||
const auto nearestCountry = qs(nearest.vcountry());
|
const auto nearestCountry = qs(nearest.vcountry());
|
||||||
if (getData()->country != nearestCountry) {
|
if (getData()->country != nearestCountry) {
|
||||||
getData()->country = nearestCountry;
|
getData()->country = nearestCountry;
|
||||||
getData()->updated.notify();
|
getData()->updated.fire({});
|
||||||
}
|
}
|
||||||
}).send();
|
}).send();
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@ struct Data {
|
||||||
|
|
||||||
Window::TermsLock termsLock;
|
Window::TermsLock termsLock;
|
||||||
|
|
||||||
base::Observable<void> updated;
|
rpl::event_stream<> updated;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue