Improve error phrase about pin limit.

This commit is contained in:
John Preston 2020-03-20 00:20:35 +04:00
parent c4a0bc1fd5
commit b3f8e27661
2 changed files with 7 additions and 4 deletions

View File

@ -2278,6 +2278,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_filters_type_no_muted" = "Muted";
"lng_filters_type_no_read" = "Read";
"lng_filters_icon_header" = "Choose icon";
"lng_filters_error_pinned_max" = "Sorry, you can't pin any more chats to the top.";
// Wnd specific

View File

@ -156,10 +156,12 @@ bool PinnedLimitReached(Dialogs::Key key, FilterId filterId) {
owner->setChatPinned(key, FilterId(), true);
entry->session().api().savePinnedOrder(folder);
} else {
const auto errorText = tr::lng_error_pinned_max(
tr::now,
lt_count,
pinnedMax);
const auto errorText = filterId
? tr::lng_filters_error_pinned_max(tr::now)
: tr::lng_error_pinned_max(
tr::now,
lt_count,
pinnedMax);
Ui::show(Box<InformBox>(errorText));
}
return true;