mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Added attention style to menu item to delete chats filter.
This commit is contained in:
parent
3e89910749
commit
3f3143514e
2 changed files with 14 additions and 8 deletions
|
@ -86,10 +86,12 @@ void ShowMenu(
|
||||||
auto showRemoveBox = [=] {
|
auto showRemoveBox = [=] {
|
||||||
state->removeApi.request(Ui::MakeWeak(parent), controller, id);
|
state->removeApi.request(Ui::MakeWeak(parent), controller, id);
|
||||||
};
|
};
|
||||||
addAction(
|
addAction({
|
||||||
tr::lng_filters_context_remove(tr::now),
|
.text = tr::lng_filters_context_remove(tr::now),
|
||||||
std::move(showRemoveBox),
|
.handler = std::move(showRemoveBox),
|
||||||
&st::menuIconDelete);
|
.icon = &st::menuIconDeleteAttention,
|
||||||
|
.isAttention = true,
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
auto customUnreadState = [=] {
|
auto customUnreadState = [=] {
|
||||||
return Data::MainListMapUnreadState(
|
return Data::MainListMapUnreadState(
|
||||||
|
|
|
@ -378,10 +378,14 @@ void FiltersMenu::showMenu(QPoint position, FilterId id) {
|
||||||
std::move(filteredChats),
|
std::move(filteredChats),
|
||||||
addAction);
|
addAction);
|
||||||
|
|
||||||
addAction(
|
addAction({
|
||||||
tr::lng_filters_context_remove(tr::now),
|
.text = tr::lng_filters_context_remove(tr::now),
|
||||||
[=] { _removeApi.request(Ui::MakeWeak(&_outer), _session, id); },
|
.handler = [=, this] {
|
||||||
&st::menuIconDelete);
|
_removeApi.request(Ui::MakeWeak(&_outer), _session, id);
|
||||||
|
},
|
||||||
|
.icon = &st::menuIconDeleteAttention,
|
||||||
|
.isAttention = true,
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
auto customUnreadState = [=] {
|
auto customUnreadState = [=] {
|
||||||
const auto session = &_session->session();
|
const auto session = &_session->session();
|
||||||
|
|
Loading…
Add table
Reference in a new issue