mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/telegramdesktop/tdesktop
synced 2026-09-21 00:23:56 +08:00
Initial global posts search implementation.
This commit is contained in:
@@ -1276,6 +1276,10 @@ void InnerWidget::paintEvent(QPaintEvent *e) {
|
||||
if (!_searchResults.empty()) {
|
||||
const auto text = showUnreadInSearchResults
|
||||
? u"Search results"_q
|
||||
: (_searchState.tab == ChatSearchTab::PublicPosts && !_searchIn)
|
||||
? (_searchState.query.isEmpty()
|
||||
? tr::lng_posts_subtitle_empty(tr::now)
|
||||
: tr::lng_posts_subtitle(tr::now))
|
||||
: tr::lng_search_found_results(
|
||||
tr::now,
|
||||
lt_count,
|
||||
@@ -3089,7 +3093,8 @@ void InnerWidget::fillArchiveSearchMenu(not_null<Ui::PopupMenu*> menu) {
|
||||
|| (_searchState.tab == ChatSearchTab::PublicPosts);
|
||||
if (!folder
|
||||
|| !folder->chatsList()->fullSize().current()
|
||||
|| (!globalSearch && _searchState.inChat)) {
|
||||
|| (!globalSearch && _searchState.inChat)
|
||||
|| (_searchState.tab == ChatSearchTab::PublicPosts)) {
|
||||
return;
|
||||
}
|
||||
const auto skip = session().settings().skipArchiveInSearch();
|
||||
@@ -3468,7 +3473,8 @@ void InnerWidget::applySearchState(SearchState state) {
|
||||
_filter = newFilter;
|
||||
if (_filter.isEmpty()
|
||||
&& !_searchState.fromPeer
|
||||
&& _searchState.tags.empty()) {
|
||||
&& _searchState.tags.empty()
|
||||
&& _searchState.tab != ChatSearchTab::PublicPosts) {
|
||||
clearFilter();
|
||||
} else {
|
||||
setState(WidgetState::Filtered);
|
||||
|
||||
Reference in New Issue
Block a user