From b3f8e276614d44b2d647ccad2e475e9f614f5bdd Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 20 Mar 2020 00:20:35 +0400 Subject: [PATCH] Improve error phrase about pin limit. --- Telegram/Resources/langs/lang.strings | 1 + Telegram/SourceFiles/window/window_peer_menu.cpp | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index 942341bf2..b47060848 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -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 diff --git a/Telegram/SourceFiles/window/window_peer_menu.cpp b/Telegram/SourceFiles/window/window_peer_menu.cpp index 3bf0f97be..12464881c 100644 --- a/Telegram/SourceFiles/window/window_peer_menu.cpp +++ b/Telegram/SourceFiles/window/window_peer_menu.cpp @@ -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(errorText)); } return true;