Renamed rpl::start_with_ with rpl::on_.

This commit is contained in:
23rd
2025-12-10 20:51:57 +03:00
parent 29b714dd5f
commit eca8dfb0ec
623 changed files with 4524 additions and 4524 deletions

View File

@@ -420,12 +420,12 @@ void FillBotUsepic(
titleLabel->width() + (icon ? icon->width() : 0),
titleLabel->height());
title->widthValue(
) | rpl::distinct_until_changed() | rpl::start_with_next([=](int w) {
) | rpl::distinct_until_changed() | rpl::on_next([=](int w) {
titleLabel->resizeToWidth(w
- (icon ? icon->width() + st::lineWidth : 0));
}, title->lifetime());
if (icon) {
title->paintRequest() | rpl::start_with_next([=] {
title->paintRequest() | rpl::on_next([=] {
auto p = Painter(title);
p.fillRect(title->rect(), Qt::transparent);
const auto x = std::min(
@@ -600,7 +600,7 @@ void ConfirmEmojiStatusBox(
box->addButton(tr::lng_cancel(), [=] {
box->closeBox();
});
box->boxClosing() | rpl::start_with_next([=] {
box->boxClosing() | rpl::on_next([=] {
if (!*set) {
done(false);
}
@@ -672,7 +672,7 @@ BotAction::BotAction(
_icon.move(_st.itemIconPosition);
paintRequest(
) | rpl::start_with_next([=] {
) | rpl::on_next([=] {
Painter p(this);
paint(p);
}, lifetime());
@@ -778,7 +778,7 @@ MenuBotIcon::MenuBotIcon(
: RpWidget(parent)
, _media(std::move(media)) {
style::PaletteChanged(
) | rpl::start_with_next([=] {
) | rpl::on_next([=] {
_image = QImage();
update();
}, lifetime());
@@ -899,7 +899,7 @@ void WebViewInstance::requestFullBot() {
_bot->session().changes().peerUpdates(
_bot,
Data::PeerUpdate::Flag::FullInfo
) | rpl::start_with_next([=] {
) | rpl::on_next([=] {
if (_botFullWaitingArgs.has_value()) {
auto args = *base::take(_botFullWaitingArgs);
if (args.url.isEmpty()) {
@@ -1346,7 +1346,7 @@ void WebViewInstance::show(ShowArgs &&args) {
: nullptr;
if (titleBadge) {
const auto raw = titleBadge.data();
raw->paintRequest() | rpl::start_with_next([=] {
raw->paintRequest() | rpl::on_next([=] {
auto p = Painter(raw);
const auto w = raw->width();
st::infoVerifiedStar.paint(p, st::lineWidth, 0, w);
@@ -1436,14 +1436,14 @@ void WebViewInstance::started(uint64 queryId) {
_session->data().webViewResultSent(
) | rpl::filter([=](const Data::Session::WebViewResultSent &sent) {
return (sent.queryId == queryId);
}) | rpl::start_with_next([=] {
}) | rpl::on_next([=] {
close();
}, _panel->lifetime());
const auto action = *_context.action;
base::timer_each(
kProlongTimeout
) | rpl::start_with_next([=] {
) | rpl::on_next([=] {
using Flag = MTPmessages_ProlongWebView::Flag;
_session->api().request(base::take(_prolongId)).cancel();
_prolongId = _session->api().request(MTPmessages_ProlongWebView(
@@ -1960,7 +1960,7 @@ void WebViewInstance::botSendPreparedMessage(
};
state->send({});
});
box->boxClosing() | rpl::start_with_next([=] {
box->boxClosing() | rpl::on_next([=] {
if (!state->sent) {
callback("USER_DECLINED");
}
@@ -1984,7 +1984,7 @@ void WebViewInstance::botSetEmojiStatus(
}
_session->data().customEmojiManager().resolve(
request.customEmojiId
) | rpl::start_with_next_error([=](not_null<DocumentData*> document) {
) | rpl::on_next_error([=](not_null<DocumentData*> document) {
const auto sticker = document->sticker();
if (!sticker || sticker->setType != Data::StickersType::Emoji) {
callback(u"SUGGESTED_EMOJI_INVALID"_q);
@@ -2727,7 +2727,7 @@ std::unique_ptr<Ui::DropdownMenu> MakeAttachBotsMenu(
bot,
callback);
action->forceShown(
) | rpl::start_with_next([=](bool shown) {
) | rpl::on_next([=](bool shown) {
if (shown) {
raw->setAutoHiding(false);
} else {

View File

@@ -109,13 +109,13 @@ PreviewWrap::PreviewWrap(
using namespace HistoryView;
_history->owner().viewRepaintRequest(
) | rpl::start_with_next([=](not_null<const Element*> view) {
) | rpl::on_next([=](not_null<const Element*> view) {
if (view == _item.get()) {
update();
}
}, lifetime());
_history->session().downloaderTaskFinished() | rpl::start_with_next([=] {
_history->session().downloaderTaskFinished() | rpl::on_next([=] {
update();
}, lifetime());
@@ -135,7 +135,7 @@ void PreviewWrap::prepare(not_null<HistoryItem*> item) {
widthValue(
) | rpl::filter([=](int width) {
return width >= st::msgMinWidth;
}) | rpl::start_with_next([=](int width) {
}) | rpl::on_next([=](int width) {
resizeTo(width);
}, lifetime());
}
@@ -211,7 +211,7 @@ void PreparedPreviewBox(
const auto lifetime = box->lifetime().make_state<rpl::lifetime>();
std::move(
recipient
) | rpl::start_with_next([=](not_null<Data::Thread*> thread) {
) | rpl::on_next([=](not_null<Data::Thread*> thread) {
info->hide(anim::type::instant);
while (row->count()) {
delete row->widgetAt(0);
@@ -219,7 +219,7 @@ void PreparedPreviewBox(
AddSkip(row);
AddSinglePeerRow(row, thread, nullptr, choose);
if (const auto topic = thread->asTopic()) {
*lifetime = topic->destroyed() | rpl::start_with_next(reset);
*lifetime = topic->destroyed() | rpl::on_next(reset);
} else {
*lifetime = rpl::lifetime();
}
@@ -230,7 +230,7 @@ void PreparedPreviewBox(
}, info->lifetime());
item->history()->owner().itemRemoved(
) | rpl::start_with_next([=](not_null<const HistoryItem*> removed) {
) | rpl::on_next([=](not_null<const HistoryItem*> removed) {
if (removed == item) {
box->closeBox();
}

View File

@@ -79,7 +79,7 @@ void Downloads::load(
applyProgress(botId, id, 0, 0);
loader.loader->updates(
) | rpl::start_with_next_error_done([=] {
) | rpl::on_next_error_done([=] {
progress(botId, id);
}, [=](FileLoader::Error) {
fail(botId, id);
@@ -411,7 +411,7 @@ void DownloadFileBox(not_null<Ui::GenericBox*> box, DownloadBoxArgs args) {
box->addButton(tr::lng_cancel(), [=] {
box->closeBox();
});
box->boxClosing() | rpl::start_with_next([=] {
box->boxClosing() | rpl::on_next([=] {
if (!*chosen) {
done(QString());
}

View File

@@ -589,7 +589,7 @@ void Sticker::setupLottie() const {
boundingBox() * style::DevicePixelRatio());
_lottie->updates(
) | rpl::start_with_next([=] {
) | rpl::on_next([=] {
update();
}, _lifetime);
}

View File

@@ -66,12 +66,12 @@ Inner::Inner(
setAttribute(Qt::WA_OpaquePaintEvent);
_controller->session().downloaderTaskFinished(
) | rpl::start_with_next([=] {
) | rpl::on_next([=] {
updateInlineItems();
}, lifetime());
controller->gifPauseLevelChanged(
) | rpl::start_with_next([=] {
) | rpl::on_next([=] {
if (!_controller->isGifPausedAtLeastFor(
Window::GifPauseReason::InlineResults)) {
updateInlineItems();
@@ -82,7 +82,7 @@ Inner::Inner(
Data::PeerUpdate::Flag::Rights
) | rpl::filter([=](const Data::PeerUpdate &update) {
return (update.peer.get() == _inlineQueryPeer);
}) | rpl::start_with_next([=] {
}) | rpl::on_next([=] {
auto isRestricted = (_restrictedLabel != nullptr);
if (isRestricted != isRestrictedView()) {
auto h = countHeight();
@@ -91,7 +91,7 @@ Inner::Inner(
}, lifetime());
sizeValue(
) | rpl::start_with_next([=](const QSize &s) {
) | rpl::on_next([=](const QSize &s) {
_mosaic.setFullWidth(s.width());
}, lifetime());

View File

@@ -53,18 +53,18 @@ Widget::Widget(
_inner->moveToLeft(0, 0, _scroll->width());
_scroll->scrolls(
) | rpl::start_with_next([=] {
) | rpl::on_next([=] {
onScroll();
}, lifetime());
_inner->inlineRowsCleared(
) | rpl::start_with_next([=] {
) | rpl::on_next([=] {
hideAnimated();
_inner->clearInlineRowsPanel();
}, lifetime());
style::PaletteChanged(
) | rpl::start_with_next([=] {
) | rpl::on_next([=] {
_innerRounding = Ui::PrepareCornerPixmaps(
ImageRoundRadius::Small,
st::emojiPanBg);
@@ -73,7 +73,7 @@ Widget::Widget(
macWindowDeactivateEvents(
) | rpl::filter([=] {
return !isHidden();
}) | rpl::start_with_next([=] {
}) | rpl::on_next([=] {
leaveEvent(nullptr);
}, lifetime());