mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Don't show full query in "nothing found" info.
This commit is contained in:
parent
440ebfcbf6
commit
b60c7e97ab
1 changed files with 5 additions and 1 deletions
|
@ -87,6 +87,7 @@ namespace {
|
||||||
|
|
||||||
constexpr auto kHashtagResultsLimit = 5;
|
constexpr auto kHashtagResultsLimit = 5;
|
||||||
constexpr auto kStartReorderThreshold = 30;
|
constexpr auto kStartReorderThreshold = 30;
|
||||||
|
constexpr auto kQueryPreviewLimit = 32;
|
||||||
|
|
||||||
[[nodiscard]] int FixedOnTopDialogsCount(not_null<Dialogs::IndexedList*> list) {
|
[[nodiscard]] int FixedOnTopDialogsCount(not_null<Dialogs::IndexedList*> list) {
|
||||||
auto result = 0;
|
auto result = 0;
|
||||||
|
@ -145,11 +146,14 @@ constexpr auto kStartReorderThreshold = 30;
|
||||||
tr::now,
|
tr::now,
|
||||||
Ui::Text::Bold));
|
Ui::Text::Bold));
|
||||||
if (!trimmed.isEmpty()) {
|
if (!trimmed.isEmpty()) {
|
||||||
|
const auto preview = (trimmed.size() > kQueryPreviewLimit + 3)
|
||||||
|
? (trimmed.mid(0, kQueryPreviewLimit) + Ui::kQEllipsis)
|
||||||
|
: trimmed;
|
||||||
text.append("\n").append(
|
text.append("\n").append(
|
||||||
tr::lng_search_tab_no_results_text(
|
tr::lng_search_tab_no_results_text(
|
||||||
tr::now,
|
tr::now,
|
||||||
lt_query,
|
lt_query,
|
||||||
trimmed));
|
trimmed.mid(0, kQueryPreviewLimit)));
|
||||||
if (hashtag) {
|
if (hashtag) {
|
||||||
text.append("\n").append(
|
text.append("\n").append(
|
||||||
tr::lng_search_tab_no_results_retry(tr::now));
|
tr::lng_search_tab_no_results_retry(tr::now));
|
||||||
|
|
Loading…
Add table
Reference in a new issue