Renamed rpl::start_with_ with rpl::on_.
This commit is contained in:
@@ -397,9 +397,9 @@ void Autocomplete::setupContent() {
|
||||
scroll->scrollToY(0);
|
||||
};
|
||||
|
||||
inner->activated() | rpl::start_with_next(submit, lifetime());
|
||||
inner->activated() | rpl::on_next(submit, lifetime());
|
||||
input->focusedChanges(
|
||||
) | rpl::filter(!rpl::mappers::_1) | rpl::start_with_next([=] {
|
||||
) | rpl::filter(!rpl::mappers::_1) | rpl::on_next([=] {
|
||||
base::call_delayed(10, this, [=] {
|
||||
if (!input->hasFocus()) {
|
||||
deactivate();
|
||||
@@ -407,11 +407,11 @@ void Autocomplete::setupContent() {
|
||||
});
|
||||
}, input->lifetime());
|
||||
input->cancelled(
|
||||
) | rpl::start_with_next([=] {
|
||||
) | rpl::on_next([=] {
|
||||
deactivate();
|
||||
}, input->lifetime());
|
||||
input->changes() | rpl::start_with_next(refresh, input->lifetime());
|
||||
input->submits() | rpl::start_with_next(submit, input->lifetime());
|
||||
input->changes() | rpl::on_next(refresh, input->lifetime());
|
||||
input->submits() | rpl::on_next(submit, input->lifetime());
|
||||
input->customUpDown(true);
|
||||
|
||||
_activate = [=] {
|
||||
@@ -430,7 +430,7 @@ void Autocomplete::setupContent() {
|
||||
};
|
||||
|
||||
paintRequest(
|
||||
) | rpl::start_with_next([=](QRect clip) {
|
||||
) | rpl::on_next([=](QRect clip) {
|
||||
QPainter p(this);
|
||||
p.fillRect(
|
||||
clip.intersected(QRect(0, st::lineWidth, width(), height())),
|
||||
@@ -441,7 +441,7 @@ void Autocomplete::setupContent() {
|
||||
}, lifetime());
|
||||
|
||||
sizeValue(
|
||||
) | rpl::start_with_next([=](QSize size) {
|
||||
) | rpl::on_next([=](QSize size) {
|
||||
inputWrap->resizeToWidth(size.width());
|
||||
inputWrap->moveToLeft(0, st::lineWidth, size.width());
|
||||
scroll->setGeometry(
|
||||
@@ -529,7 +529,7 @@ void ConfirmContactBox::prepare() {
|
||||
|
||||
const auto button = addButton(tr::lng_send_button(), [] {});
|
||||
button->clicks(
|
||||
) | rpl::start_with_next([=](Qt::MouseButton which) {
|
||||
) | rpl::on_next([=](Qt::MouseButton which) {
|
||||
_submit((which == Qt::RightButton)
|
||||
? SkipSwitchModifiers()
|
||||
: button->clickModifiers());
|
||||
|
||||
@@ -116,9 +116,9 @@ void EditInfoBox::prepare() {
|
||||
addButton(tr::lng_settings_save(), save);
|
||||
addButton(tr::lng_cancel(), [=] { closeBox(); });
|
||||
|
||||
_field->submits() | rpl::start_with_next(save, _field->lifetime());
|
||||
_field->submits() | rpl::on_next(save, _field->lifetime());
|
||||
_field->cancelled(
|
||||
) | rpl::start_with_next([=] {
|
||||
) | rpl::on_next([=] {
|
||||
closeBox();
|
||||
}, _field->lifetime());
|
||||
Ui::Emoji::SuggestionsController::Init(
|
||||
@@ -131,14 +131,14 @@ void EditInfoBox::prepare() {
|
||||
_field->setTextCursor(cursor);
|
||||
|
||||
widthValue(
|
||||
) | rpl::start_with_next([=](int width) {
|
||||
) | rpl::on_next([=](int width) {
|
||||
_field->resizeToWidth(
|
||||
width - st::boxPadding.left() - st::boxPadding.right());
|
||||
_field->moveToLeft(st::boxPadding.left(), st::boxPadding.bottom());
|
||||
}, _field->lifetime());
|
||||
|
||||
_field->heightValue(
|
||||
) | rpl::start_with_next([=](int height) {
|
||||
) | rpl::on_next([=](int height) {
|
||||
setDimensions(
|
||||
st::boxWideWidth,
|
||||
st::boxPadding.bottom() + height + st::boxPadding.bottom());
|
||||
@@ -327,7 +327,7 @@ void Helper::registerWindow(not_null<Window::SessionController*> controller) {
|
||||
const auto history = key.history();
|
||||
return TrackHistoryOccupation(history) ? history : nullptr;
|
||||
}) | rpl::distinct_until_changed(
|
||||
) | rpl::start_with_next([=](History *history) {
|
||||
) | rpl::on_next([=](History *history) {
|
||||
updateOccupiedHistory(controller, history);
|
||||
}, controller->lifetime());
|
||||
}
|
||||
|
||||
@@ -450,7 +450,7 @@ struct Templates::Updates {
|
||||
Templates::Templates(not_null<Main::Session*> session) : _session(session) {
|
||||
load();
|
||||
Shortcuts::Requests(
|
||||
) | rpl::start_with_next([=](not_null<Shortcuts::Request*> request) {
|
||||
) | rpl::on_next([=](not_null<Shortcuts::Request*> request) {
|
||||
using Command = Shortcuts::Command;
|
||||
request->check(
|
||||
Command::SupportReloadTemplates
|
||||
@@ -463,7 +463,7 @@ Templates::Templates(not_null<Main::Session*> session) : _session(session) {
|
||||
|
||||
void Templates::reload() {
|
||||
_reloadToastSubscription = errors(
|
||||
) | rpl::start_with_next([=](QStringList errors) {
|
||||
) | rpl::on_next([=](QStringList errors) {
|
||||
Ui::Toast::Show(errors.isEmpty()
|
||||
? "Templates reloaded!"
|
||||
: ("Errors:\n\n" + errors.join("\n\n")));
|
||||
|
||||
Reference in New Issue
Block a user