mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Renamed rpl::start_with_ with rpl::on_.
This commit is contained in:
@@ -754,7 +754,7 @@ ProxiesBox::ProxiesBox(
|
||||
, _settings(settings)
|
||||
, _initialWrap(this) {
|
||||
_controller->views(
|
||||
) | rpl::start_with_next([=](View &&view) {
|
||||
) | rpl::on_next([=](View &&view) {
|
||||
applyView(std::move(view));
|
||||
}, lifetime());
|
||||
}
|
||||
@@ -883,17 +883,17 @@ void ProxiesBox::setupContent() {
|
||||
refreshProxyForCalls();
|
||||
});
|
||||
_tryIPv6->checkedChanges(
|
||||
) | rpl::start_with_next([=](bool checked) {
|
||||
) | rpl::on_next([=](bool checked) {
|
||||
_controller->setTryIPv6(checked);
|
||||
}, _tryIPv6->lifetime());
|
||||
|
||||
_controller->proxySettingsValue(
|
||||
) | rpl::start_with_next([=](ProxyData::Settings value) {
|
||||
) | rpl::on_next([=](ProxyData::Settings value) {
|
||||
_proxySettings->setValue(value);
|
||||
}, inner->lifetime());
|
||||
|
||||
_proxyForCalls->entity()->checkedChanges(
|
||||
) | rpl::start_with_next([=](bool checked) {
|
||||
) | rpl::on_next([=](bool checked) {
|
||||
_controller->setProxyForCalls(checked);
|
||||
}, _proxyForCalls->lifetime());
|
||||
|
||||
@@ -930,7 +930,7 @@ void ProxiesBox::setupContent() {
|
||||
+ 3 * rowHeight()),
|
||||
st::boxMaxListHeight);
|
||||
}) | rpl::distinct_until_changed(
|
||||
) | rpl::start_with_next([=](int height) {
|
||||
) | rpl::on_next([=](int height) {
|
||||
setDimensions(st::boxWideWidth, height);
|
||||
}, inner->lifetime());
|
||||
}
|
||||
@@ -1005,7 +1005,7 @@ void ProxiesBox::createNoRowsLabel() {
|
||||
tr::lng_proxy_description(tr::now),
|
||||
st::proxyEmptyListLabel);
|
||||
_noRows->widthValue(
|
||||
) | rpl::start_with_next([=](int width) {
|
||||
) | rpl::on_next([=](int width) {
|
||||
label->resizeToWidth(width);
|
||||
label->moveToLeft(0, 0);
|
||||
}, label->lifetime());
|
||||
@@ -1013,29 +1013,29 @@ void ProxiesBox::createNoRowsLabel() {
|
||||
|
||||
void ProxiesBox::setupButtons(int id, not_null<ProxyRow*> button) {
|
||||
button->deleteClicks(
|
||||
) | rpl::start_with_next([=] {
|
||||
) | rpl::on_next([=] {
|
||||
_controller->deleteItem(id);
|
||||
}, button->lifetime());
|
||||
|
||||
button->restoreClicks(
|
||||
) | rpl::start_with_next([=] {
|
||||
) | rpl::on_next([=] {
|
||||
_controller->restoreItem(id);
|
||||
}, button->lifetime());
|
||||
|
||||
button->editClicks(
|
||||
) | rpl::start_with_next([=] {
|
||||
) | rpl::on_next([=] {
|
||||
getDelegate()->show(_controller->editItemBox(id));
|
||||
}, button->lifetime());
|
||||
|
||||
rpl::merge(
|
||||
button->shareClicks() | rpl::map_to(false),
|
||||
button->showQrClicks() | rpl::map_to(true)
|
||||
) | rpl::start_with_next([=](bool qr) {
|
||||
) | rpl::on_next([=](bool qr) {
|
||||
_controller->shareItem(id, qr);
|
||||
}, button->lifetime());
|
||||
|
||||
button->clicks(
|
||||
) | rpl::start_with_next([=] {
|
||||
) | rpl::on_next([=] {
|
||||
_controller->applyItem(id);
|
||||
}, button->lifetime());
|
||||
}
|
||||
@@ -1071,7 +1071,7 @@ void ProxyBox::prepare() {
|
||||
});
|
||||
});
|
||||
_port.data()->events(
|
||||
) | rpl::start_with_next([=](not_null<QEvent*> e) {
|
||||
) | rpl::on_next([=](not_null<QEvent*> e) {
|
||||
if (e->type() == QEvent::KeyPress
|
||||
&& (static_cast<QKeyEvent*>(e.get())->key() == Qt::Key_Backspace)
|
||||
&& _port->cursorPosition() == 0) {
|
||||
@@ -1181,7 +1181,7 @@ void ProxyBox::setupSocketAddress(const ProxyData &data) {
|
||||
data.port ? QString::number(data.port) : QString(),
|
||||
65535);
|
||||
address->widthValue(
|
||||
) | rpl::start_with_next([=](int width) {
|
||||
) | rpl::on_next([=](int width) {
|
||||
_port->moveToRight(0, 0);
|
||||
_host->resize(
|
||||
width - _port->width() - st::proxyEditSkip,
|
||||
@@ -1213,11 +1213,11 @@ void ProxyBox::setupCredentials(const ProxyData &data) {
|
||||
(data.type == Type::Mtproto) ? QString() : data.password);
|
||||
_password->move(0, 0);
|
||||
_password->heightValue(
|
||||
) | rpl::start_with_next([=, wrap = passwordWrap.data()](int height) {
|
||||
) | rpl::on_next([=, wrap = passwordWrap.data()](int height) {
|
||||
wrap->resize(wrap->width(), height);
|
||||
}, _password->lifetime());
|
||||
passwordWrap->widthValue(
|
||||
) | rpl::start_with_next([=](int width) {
|
||||
) | rpl::on_next([=](int width) {
|
||||
_password->resize(width, _password->height());
|
||||
}, _password->lifetime());
|
||||
credentials->add(std::move(passwordWrap), st::proxyEditInputPadding);
|
||||
@@ -1239,11 +1239,11 @@ void ProxyBox::setupMtprotoCredentials(const ProxyData &data) {
|
||||
(data.type == Type::Mtproto) ? data.password : QString());
|
||||
_secret->move(0, 0);
|
||||
_secret->heightValue(
|
||||
) | rpl::start_with_next([=, wrap = secretWrap.data()](int height) {
|
||||
) | rpl::on_next([=, wrap = secretWrap.data()](int height) {
|
||||
wrap->resize(wrap->width(), height);
|
||||
}, _secret->lifetime());
|
||||
secretWrap->widthValue(
|
||||
) | rpl::start_with_next([=](int width) {
|
||||
) | rpl::on_next([=](int width) {
|
||||
_secret->resize(width, _secret->height());
|
||||
}, _secret->lifetime());
|
||||
mtproto->add(std::move(secretWrap), st::proxyEditInputPadding);
|
||||
@@ -1305,7 +1305,7 @@ ProxiesBoxController::ProxiesBoxController(not_null<Main::Account*> account)
|
||||
}) | ranges::to_vector;
|
||||
|
||||
_settings.connectionTypeChanges(
|
||||
) | rpl::start_with_next([=] {
|
||||
) | rpl::on_next([=] {
|
||||
_proxySettingsChanges.fire_copy(_settings.settings());
|
||||
const auto i = findByProxy(_settings.selected());
|
||||
if (i != end(_list)) {
|
||||
|
||||
Reference in New Issue
Block a user