mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 22:54:01 +02:00
Added short variant of unfiltered chats list to chats filters strip.
This commit is contained in:
parent
f0f2a71a87
commit
edf6c42e9d
2 changed files with 3 additions and 2 deletions
|
@ -5045,6 +5045,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
"lng_outdated_now" = "So Telegram Desktop can update to newer versions.";
|
"lng_outdated_now" = "So Telegram Desktop can update to newer versions.";
|
||||||
|
|
||||||
"lng_filters_all" = "All chats";
|
"lng_filters_all" = "All chats";
|
||||||
|
"lng_filters_all_short" = "All";
|
||||||
"lng_filters_setup" = "Edit";
|
"lng_filters_setup" = "Edit";
|
||||||
"lng_filters_title" = "Folders";
|
"lng_filters_title" = "Folders";
|
||||||
"lng_filters_subtitle" = "My folders";
|
"lng_filters_subtitle" = "My folders";
|
||||||
|
|
|
@ -146,7 +146,7 @@ void ShowFiltersListMenu(
|
||||||
for (auto i = 0; i < list.size(); ++i) {
|
for (auto i = 0; i < list.size(); ++i) {
|
||||||
const auto &filter = list[i];
|
const auto &filter = list[i];
|
||||||
auto text = filter.title().isEmpty()
|
auto text = filter.title().isEmpty()
|
||||||
? tr::lng_filters_all(tr::now)
|
? tr::lng_filters_all_short(tr::now)
|
||||||
: filter.title();
|
: filter.title();
|
||||||
|
|
||||||
const auto action = state->menu->addAction(std::move(text), [=] {
|
const auto action = state->menu->addAction(std::move(text), [=] {
|
||||||
|
@ -291,7 +291,7 @@ not_null<Ui::RpWidget*> AddChatFiltersTabsStrip(
|
||||||
list
|
list
|
||||||
) | ranges::views::transform([](const Data::ChatFilter &filter) {
|
) | ranges::views::transform([](const Data::ChatFilter &filter) {
|
||||||
return filter.title().isEmpty()
|
return filter.title().isEmpty()
|
||||||
? tr::lng_filters_all(tr::now)
|
? tr::lng_filters_all_short(tr::now)
|
||||||
: filter.title();
|
: filter.title();
|
||||||
}) | ranges::to_vector;
|
}) | ranges::to_vector;
|
||||||
slider->setSections(std::move(sections));
|
slider->setSections(std::move(sections));
|
||||||
|
|
Loading…
Add table
Reference in a new issue