mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 06:07:06 +02:00
Fix empty search placeholder.
This commit is contained in:
parent
ebaffc333e
commit
056ba644ed
1 changed files with 8 additions and 1 deletions
|
@ -118,9 +118,16 @@ constexpr auto kChatPreviewDelay = crl::time(1000);
|
|||
const auto query = state.query.trimmed();
|
||||
const auto hashtag = !query.isEmpty() && (query[0] == '#');
|
||||
const auto trimmed = hashtag ? query.mid(1).trimmed() : query;
|
||||
const auto fromPeer = (state.tab == ChatSearchTab::MyMessages
|
||||
|| state.tab == ChatSearchTab::PublicPosts
|
||||
|| !state.inChat.peer()
|
||||
|| !(state.inChat.peer()->isChat()
|
||||
|| state.inChat.peer()->isMegagroup()))
|
||||
? nullptr
|
||||
: state.fromPeer;
|
||||
const auto waiting = trimmed.isEmpty()
|
||||
&& state.tags.empty()
|
||||
&& !state.fromPeer;
|
||||
&& !fromPeer;
|
||||
const auto icon = waiting
|
||||
? SearchEmptyIcon::Search
|
||||
: SearchEmptyIcon::NoResults;
|
||||
|
|
Loading…
Add table
Reference in a new issue