Fixed display of empty result of topics search.

This commit is contained in:
23rd 2023-01-20 12:08:37 +03:00 committed by John Preston
parent 465a33f095
commit 23a1f7b83c
2 changed files with 4 additions and 4 deletions

View File

@ -390,6 +390,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_no_chats_filter" = "No chats currently belong to this folder.";
"lng_contacts_loading" = "Loading...";
"lng_contacts_not_found" = "No contacts found";
"lng_topics_not_found" = "No topics found.";
"lng_dlg_search_for_messages" = "Search for messages";
"lng_update_telegram" = "Update Telegram";
"lng_dlg_search_in" = "Search messages in";

View File

@ -590,11 +590,10 @@ void ChooseTopicSearchController::searchOnServer() {
}
delegate()->peerListSearchAddRow(topic->rootId().bare);
});
if (_offsetTopicId != savedTopicId) {
delegate()->peerListSearchRefreshRows();
} else {
if (_offsetTopicId == savedTopicId) {
_allLoaded = true;
}
delegate()->peerListSearchRefreshRows();
}).fail([=] {
_allLoaded = true;
}).send();
@ -699,7 +698,7 @@ void ChooseTopicBoxController::rowClicked(not_null<PeerListRow*> row) {
void ChooseTopicBoxController::prepare() {
delegate()->peerListSetTitle(tr::lng_forward_choose());
setSearchNoResultsText(tr::lng_blocked_list_not_found(tr::now));
setSearchNoResultsText(tr::lng_topics_not_found(tr::now));
delegate()->peerListSetSearchMode(PeerListSearchMode::Enabled);
refreshRows(true);