2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-05 08:55:59 +00:00

Append server-side topic search results.

This commit is contained in:
John Preston
2022-10-26 18:18:00 +04:00
parent d6ee5b3456
commit 60aef7871a
9 changed files with 224 additions and 73 deletions

View File

@@ -88,6 +88,7 @@ public:
void scrollToEntry(const RowDescriptor &entry);
void searchMessages(const QString &query, Key inChat = {});
void searchTopics();
void searchMore();
void updateForwardBar();
@@ -150,7 +151,8 @@ private:
void setupMainMenuToggle();
void setupDownloadBar();
void setupShortcuts();
bool searchForPeersRequired(const QString &query) const;
[[nodiscard]] bool searchForPeersRequired(const QString &query) const;
[[nodiscard]] bool searchForTopicsRequired(const QString &query) const;
void setSearchInChat(Key chat, PeerData *from = nullptr);
void showCalendar();
void showSearchFrom();
@@ -244,6 +246,13 @@ private:
bool _peerSearchFull = false;
mtpRequestId _peerSearchRequest = 0;
QString _topicSearchQuery;
TimeId _topicSearchOffsetDate = 0;
MsgId _topicSearchOffsetId = 0;
MsgId _topicSearchOffsetTopicId = 0;
bool _topicSearchFull = false;
mtpRequestId _topicSearchRequest = 0;
QString _searchQuery;
PeerData *_searchQueryFrom = nullptr;
int32 _searchNextRate = 0;