diff --git a/Telegram/SourceFiles/boxes/moderate_messages_box.cpp b/Telegram/SourceFiles/boxes/moderate_messages_box.cpp index 533cfefc5a..754f3df821 100644 --- a/Telegram/SourceFiles/boxes/moderate_messages_box.cpp +++ b/Telegram/SourceFiles/boxes/moderate_messages_box.cpp @@ -202,7 +202,7 @@ void FillMenuModerateCommonGroups( nullptr); const auto state = item->lifetime().make_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()); diff --git a/Telegram/SourceFiles/boxes/peers/edit_participants_box.cpp b/Telegram/SourceFiles/boxes/peers/edit_participants_box.cpp index b0004bcc86..66de189874 100644 --- a/Telegram/SourceFiles/boxes/peers/edit_participants_box.cpp +++ b/Telegram/SourceFiles/boxes/peers/edit_participants_box.cpp @@ -1698,7 +1698,7 @@ base::unique_qptr ParticipantsBoxController::rowContextMenu( st::historyHasCustomEmojiPosition, std::move(text)); if (const auto n = _navigation) { - button->setClickedCallback([=] { + button->setActionTriggered([=] { n->parentController()->show(PrepareShortInfoBox(by, n)); }); } diff --git a/Telegram/SourceFiles/boxes/star_gift_resale_box.cpp b/Telegram/SourceFiles/boxes/star_gift_resale_box.cpp index d5724f0759..0c1cdf84dd 100644 --- a/Telegram/SourceFiles/boxes/star_gift_resale_box.cpp +++ b/Telegram/SourceFiles/boxes/star_gift_resale_box.cpp @@ -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 = [=]( diff --git a/Telegram/SourceFiles/calls/group/calls_group_menu.cpp b/Telegram/SourceFiles/calls/group/calls_group_menu.cpp index 693811c2e5..354e9c0dea 100644 --- a/Telegram/SourceFiles/calls/group/calls_group_menu.cpp +++ b/Telegram/SourceFiles/calls/group/calls_group_menu.cpp @@ -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([=] { diff --git a/Telegram/SourceFiles/core/bank_card_click_handler.cpp b/Telegram/SourceFiles/core/bank_card_click_handler.cpp index 03c605dc25..3191c49122 100644 --- a/Telegram/SourceFiles/core/bank_card_click_handler.cpp +++ b/Telegram/SourceFiles/core/bank_card_click_handler.cpp @@ -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)); }; diff --git a/Telegram/SourceFiles/core/phone_click_handler.cpp b/Telegram/SourceFiles/core/phone_click_handler.cpp index 13528b062b..75094e6005 100644 --- a/Telegram/SourceFiles/core/phone_click_handler.cpp +++ b/Telegram/SourceFiles/core/phone_click_handler.cpp @@ -91,7 +91,7 @@ ResolvePhoneAction::ResolvePhoneAction( + st::groupCallJoinAsPhotoSize) { setAcceptBoth(true); fitToMenuWidth(); - setClickedCallback([=] { + setActionTriggered([=] { if (const auto peer = _peer.current()) { controller->showPeerInfo(peer); } diff --git a/Telegram/SourceFiles/dialogs/ui/chat_search_in.cpp b/Telegram/SourceFiles/dialogs/ui/chat_search_in.cpp index a9baa369c9..2ec9e8a7ef 100644 --- a/Telegram/SourceFiles/dialogs/ui/chat_search_in.cpp +++ b/Telegram/SourceFiles/dialogs/ui/chat_search_in.cpp @@ -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)); diff --git a/Telegram/SourceFiles/history/view/history_view_context_menu.cpp b/Telegram/SourceFiles/history/view/history_view_context_menu.cpp index 6acabc7a7b..d052fee277 100644 --- a/Telegram/SourceFiles/history/view/history_view_context_menu.cpp +++ b/Telegram/SourceFiles/history/view/history_view_context_menu.cpp @@ -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; diff --git a/Telegram/SourceFiles/history/view/history_view_translate_bar.cpp b/Telegram/SourceFiles/history/view/history_view_translate_bar.cpp index d935006a00..887c7ff0d3 100644 --- a/Telegram/SourceFiles/history/view/history_view_translate_bar.cpp +++ b/Telegram/SourceFiles/history/view/history_view_translate_bar.cpp @@ -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([=] { diff --git a/Telegram/SourceFiles/inline_bots/bot_attach_web_view.cpp b/Telegram/SourceFiles/inline_bots/bot_attach_web_view.cpp index 117606fd52..00d31d321d 100644 --- a/Telegram/SourceFiles/inline_bots/bot_attach_web_view.cpp +++ b/Telegram/SourceFiles/inline_bots/bot_attach_web_view.cpp @@ -666,7 +666,7 @@ BotAction::BotAction( + _st.itemPadding.bottom()) { setAcceptBoth(false); fitToMenuWidth(); - setClickedCallback(std::move(callback)); + setActionTriggered(std::move(callback)); _icon.move(_st.itemIconPosition); diff --git a/Telegram/SourceFiles/menu/menu_mute.cpp b/Telegram/SourceFiles/menu/menu_mute.cpp index c3ae99fa37..3e038b3518 100644 --- a/Telegram/SourceFiles/menu/menu_mute.cpp +++ b/Telegram/SourceFiles/menu/menu_mute.cpp @@ -113,7 +113,7 @@ MuteItem::MuteItem( }, lifetime()); _animation.stop(); - setClickedCallback([=] { + setActionTriggered([=] { descriptor.updateMutePeriod(_isMuted ? 0 : kMuteForeverValue); }); } diff --git a/Telegram/SourceFiles/ui/chat/attach/attach_bot_downloads.cpp b/Telegram/SourceFiles/ui/chat/attach/attach_bot_downloads.cpp index a6e0045cc6..037b3a4c91 100644 --- a/Telegram/SourceFiles/ui/chat/attach/attach_bot_downloads.cpp +++ b/Telegram/SourceFiles/ui/chat/attach/attach_bot_downloads.cpp @@ -70,7 +70,7 @@ Action::Action( + st::ttlItemPadding.bottom()) { setAcceptBoth(true); fitToMenuWidth(); - setClickedCallback([=] { + setActionTriggered([=] { if (isEnabled()) { callback(DownloadsAction::Open); } diff --git a/Telegram/SourceFiles/ui/controls/delete_message_context_action.cpp b/Telegram/SourceFiles/ui/controls/delete_message_context_action.cpp index e4b328b37b..9cecf76e10 100644 --- a/Telegram/SourceFiles/ui/controls/delete_message_context_action.cpp +++ b/Telegram/SourceFiles/ui/controls/delete_message_context_action.cpp @@ -84,7 +84,7 @@ ActionWithTimer::ActionWithTimer( + st::ttlItemPadding.bottom()) { setAcceptBoth(true); fitToMenuWidth(); - setClickedCallback(std::move(callback)); + setActionTriggered(std::move(callback)); paintRequest( ) | rpl::on_next([=] { diff --git a/Telegram/SourceFiles/ui/controls/who_reacted_context_action.cpp b/Telegram/SourceFiles/ui/controls/who_reacted_context_action.cpp index 8583a7aba0..ecc9ccee14 100644 --- a/Telegram/SourceFiles/ui/controls/who_reacted_context_action.cpp +++ b/Telegram/SourceFiles/ui/controls/who_reacted_context_action.cpp @@ -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()) { diff --git a/Telegram/lib_ui b/Telegram/lib_ui index 1110d1bc3b..2eb8e6ce79 160000 --- a/Telegram/lib_ui +++ b/Telegram/lib_ui @@ -1 +1 @@ -Subproject commit 1110d1bc3bf02963b031da7107ebbbd26649f747 +Subproject commit 2eb8e6ce79d49967dc706018c7dbcbbb746c5537