Added attention style to menu item to delete chats filter.

This commit is contained in:
23rd 2024-11-17 11:20:02 +03:00
parent 3e89910749
commit 3f3143514e
2 changed files with 14 additions and 8 deletions

View file

@ -86,10 +86,12 @@ void ShowMenu(
auto showRemoveBox = [=] {
state->removeApi.request(Ui::MakeWeak(parent), controller, id);
};
addAction(
tr::lng_filters_context_remove(tr::now),
std::move(showRemoveBox),
&st::menuIconDelete);
addAction({
.text = tr::lng_filters_context_remove(tr::now),
.handler = std::move(showRemoveBox),
.icon = &st::menuIconDeleteAttention,
.isAttention = true,
});
} else {
auto customUnreadState = [=] {
return Data::MainListMapUnreadState(

View file

@ -378,10 +378,14 @@ void FiltersMenu::showMenu(QPoint position, FilterId id) {
std::move(filteredChats),
addAction);
addAction(
tr::lng_filters_context_remove(tr::now),
[=] { _removeApi.request(Ui::MakeWeak(&_outer), _session, id); },
&st::menuIconDelete);
addAction({
.text = tr::lng_filters_context_remove(tr::now),
.handler = [=, this] {
_removeApi.request(Ui::MakeWeak(&_outer), _session, id);
},
.icon = &st::menuIconDeleteAttention,
.isAttention = true,
});
} else {
auto customUnreadState = [=] {
const auto session = &_session->session();