mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-14 13:17:08 +02:00
Fix folder context menu Remove text color.
This commit is contained in:
parent
73349c3c89
commit
39780f49bf
1 changed files with 6 additions and 12 deletions
|
@ -23,6 +23,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "ui/filter_icons.h"
|
||||
#include "ui/wrap/vertical_layout.h"
|
||||
#include "ui/wrap/vertical_layout_reorder.h"
|
||||
#include "ui/widgets/menu/menu_add_action_callback_factory.h"
|
||||
#include "ui/widgets/popup_menu.h"
|
||||
#include "ui/boxes/confirm_box.h"
|
||||
#include "ui/ui_utility.h"
|
||||
|
@ -356,18 +357,11 @@ void FiltersMenu::showMenu(QPoint position, FilterId id) {
|
|||
_popupMenu = base::make_unique_q<Ui::PopupMenu>(
|
||||
i->second.get(),
|
||||
st::popupMenuWithIcons);
|
||||
const auto addAction = Window::PeerMenuCallback([&](
|
||||
Window::PeerMenuCallback::Args args) {
|
||||
return _popupMenu->addAction(
|
||||
args.text,
|
||||
crl::guard(&_outer, std::move(args.handler)),
|
||||
args.icon);
|
||||
});
|
||||
|
||||
const auto addAction = Ui::Menu::CreateAddActionCallback(_popupMenu);
|
||||
if (id) {
|
||||
addAction(
|
||||
tr::lng_filters_context_edit(tr::now),
|
||||
[=] { EditExistingFilter(_session, id); },
|
||||
crl::guard(&_outer, [=] { EditExistingFilter(_session, id); }),
|
||||
&st::menuIconEdit);
|
||||
|
||||
auto filteredChats = [=] {
|
||||
|
@ -380,9 +374,9 @@ void FiltersMenu::showMenu(QPoint position, FilterId id) {
|
|||
|
||||
addAction({
|
||||
.text = tr::lng_filters_context_remove(tr::now),
|
||||
.handler = [=, this] {
|
||||
.handler = crl::guard(&_outer, [=, this] {
|
||||
_removeApi.request(Ui::MakeWeak(&_outer), _session, id);
|
||||
},
|
||||
}),
|
||||
.icon = &st::menuIconDeleteAttention,
|
||||
.isAttention = true,
|
||||
});
|
||||
|
@ -401,7 +395,7 @@ void FiltersMenu::showMenu(QPoint position, FilterId id) {
|
|||
|
||||
addAction(
|
||||
tr::lng_filters_setup_menu(tr::now),
|
||||
[=] { openFiltersSettings(); },
|
||||
crl::guard(&_outer, [=] { openFiltersSettings(); }),
|
||||
&st::menuIconEdit);
|
||||
}
|
||||
if (_popupMenu->empty()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue