mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Replaced ItemBase::setClickedCallback with setActionTriggered.
This commit is contained in:
@@ -202,7 +202,7 @@ void FillMenuModerateCommonGroups(
|
||||
nullptr);
|
||||
const auto state = item->lifetime().make_state<State>();
|
||||
item->AbstractButton::setDisabled(true);
|
||||
item->Ui::Menu::ItemBase::setClickedCallback([=, peerId = group->id] {
|
||||
item->Ui::Menu::ItemBase::setActionTriggered([=, peerId = group->id] {
|
||||
state->checkbox->setChecked(!state->checkbox->checked());
|
||||
if (state->checkbox->checked()) {
|
||||
resultList->insert(peerId);
|
||||
@@ -252,7 +252,7 @@ void FillMenuModerateCommonGroups(
|
||||
nullptr,
|
||||
nullptr);
|
||||
item->AbstractButton::setDisabled(true);
|
||||
item->Ui::Menu::ItemBase::setClickedCallback([=] {
|
||||
item->Ui::Menu::ItemBase::setActionTriggered([=] {
|
||||
rememberCheckbox->setChecked(!rememberCheckbox->checked());
|
||||
});
|
||||
rememberCheckbox->setParent(item.get());
|
||||
|
||||
@@ -1698,7 +1698,7 @@ base::unique_qptr<Ui::PopupMenu> ParticipantsBoxController::rowContextMenu(
|
||||
st::historyHasCustomEmojiPosition,
|
||||
std::move(text));
|
||||
if (const auto n = _navigation) {
|
||||
button->setClickedCallback([=] {
|
||||
button->setActionTriggered([=] {
|
||||
n->parentController()->show(PrepareShortInfoBox(by, n));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ struct ResaleTabs {
|
||||
QString(),
|
||||
icon);
|
||||
action->setChecked(checked);
|
||||
action->setClickedCallback(std::move(callback));
|
||||
action->setActionTriggered(std::move(callback));
|
||||
menu->addAction(std::move(action));
|
||||
};
|
||||
auto context = Core::TextContext({ .session = &show->session() });
|
||||
@@ -183,7 +183,7 @@ struct ResaleTabs {
|
||||
data,
|
||||
nullptr);
|
||||
action->setChecked(checked);
|
||||
action->setClickedCallback(std::move(callback));
|
||||
action->setActionTriggered(std::move(callback));
|
||||
menu->addAction(std::move(action));
|
||||
};
|
||||
const auto actionWithDocument = [=](
|
||||
|
||||
@@ -129,7 +129,7 @@ JoinAsAction::JoinAsAction(
|
||||
+ st::groupCallJoinAsPadding.bottom()) {
|
||||
setAcceptBoth(true);
|
||||
fitToMenuWidth();
|
||||
setClickedCallback(std::move(callback));
|
||||
setActionTriggered(std::move(callback));
|
||||
|
||||
paintRequest(
|
||||
) | rpl::on_next([=] {
|
||||
@@ -263,7 +263,7 @@ RecordingAction::RecordingAction(
|
||||
|
||||
setAcceptBoth(true);
|
||||
fitToMenuWidth();
|
||||
setClickedCallback(std::move(callback));
|
||||
setActionTriggered(std::move(callback));
|
||||
|
||||
paintRequest(
|
||||
) | rpl::on_next([=] {
|
||||
|
||||
@@ -214,7 +214,7 @@ void BankCardClickHandler::onClick(ClickContext context) const {
|
||||
st::historyHasCustomEmoji,
|
||||
st::historyBankCardMenuMultilinePosition,
|
||||
TextWithEntities{ name });
|
||||
button->setClickedCallback(copy);
|
||||
button->setActionTriggered(copy);
|
||||
menu->addAction(std::move(button));
|
||||
};
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ ResolvePhoneAction::ResolvePhoneAction(
|
||||
+ st::groupCallJoinAsPhotoSize) {
|
||||
setAcceptBoth(true);
|
||||
fitToMenuWidth();
|
||||
setClickedCallback([=] {
|
||||
setActionTriggered([=] {
|
||||
if (const auto peer = _peer.current()) {
|
||||
controller->showPeerInfo(peer);
|
||||
}
|
||||
|
||||
@@ -332,7 +332,7 @@ void ChatSearchIn::showMenu() {
|
||||
tab.icon,
|
||||
TabLabel(value, _peerTabType),
|
||||
(value == active));
|
||||
action->setClickedCallback([=] {
|
||||
action->setActionTriggered([=] {
|
||||
_active = value;
|
||||
});
|
||||
_menu->addAction(std::move(action));
|
||||
|
||||
@@ -2006,7 +2006,7 @@ void AddEmojiPacksAction(
|
||||
st::historyHasCustomEmojiPosition,
|
||||
std::move(text));
|
||||
const auto weak = base::make_weak(controller);
|
||||
button->setClickedCallback([=] {
|
||||
button->setActionTriggered([=] {
|
||||
const auto strong = weak.get();
|
||||
if (!strong) {
|
||||
return;
|
||||
|
||||
@@ -108,7 +108,7 @@ TwoTextAction::TwoTextAction(
|
||||
+ st::ttlItemTimerFont->height
|
||||
+ st::ttlItemPadding.bottom()) {
|
||||
fitToMenuWidth();
|
||||
setClickedCallback(std::move(callback));
|
||||
setActionTriggered(std::move(callback));
|
||||
|
||||
paintRequest(
|
||||
) | rpl::on_next([=] {
|
||||
|
||||
@@ -666,7 +666,7 @@ BotAction::BotAction(
|
||||
+ _st.itemPadding.bottom()) {
|
||||
setAcceptBoth(false);
|
||||
fitToMenuWidth();
|
||||
setClickedCallback(std::move(callback));
|
||||
setActionTriggered(std::move(callback));
|
||||
|
||||
_icon.move(_st.itemIconPosition);
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ MuteItem::MuteItem(
|
||||
}, lifetime());
|
||||
_animation.stop();
|
||||
|
||||
setClickedCallback([=] {
|
||||
setActionTriggered([=] {
|
||||
descriptor.updateMutePeriod(_isMuted ? 0 : kMuteForeverValue);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ Action::Action(
|
||||
+ st::ttlItemPadding.bottom()) {
|
||||
setAcceptBoth(true);
|
||||
fitToMenuWidth();
|
||||
setClickedCallback([=] {
|
||||
setActionTriggered([=] {
|
||||
if (isEnabled()) {
|
||||
callback(DownloadsAction::Open);
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ ActionWithTimer::ActionWithTimer(
|
||||
+ st::ttlItemPadding.bottom()) {
|
||||
setAcceptBoth(true);
|
||||
fitToMenuWidth();
|
||||
setClickedCallback(std::move(callback));
|
||||
setActionTriggered(std::move(callback));
|
||||
|
||||
paintRequest(
|
||||
) | rpl::on_next([=] {
|
||||
|
||||
@@ -759,7 +759,7 @@ int WhoReactedEntryAction::contentHeight() const {
|
||||
}
|
||||
|
||||
void WhoReactedEntryAction::setData(Data &&data) {
|
||||
setClickedCallback(std::move(data.callback));
|
||||
setActionTriggered(std::move(data.callback));
|
||||
_userpic = std::move(data.userpic);
|
||||
_text.setMarkedText(_st.itemStyle, { data.text }, MenuTextOptions);
|
||||
if (data.date.isEmpty()) {
|
||||
|
||||
+1
-1
Submodule Telegram/lib_ui updated: 1110d1bc3b...2eb8e6ce79
Reference in New Issue
Block a user