mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Added initial implementation of smart stickers search.
This commit is contained in:
@@ -286,7 +286,6 @@ private:
|
||||
bool paused,
|
||||
bool selected,
|
||||
bool deleteSelected);
|
||||
void paintEmptySearchResults(Painter &p);
|
||||
|
||||
void ensureLottiePlayer(Set &set);
|
||||
void setupLottie(Set &set, int section, int index);
|
||||
@@ -357,11 +356,13 @@ private:
|
||||
void cancelSetsSearch();
|
||||
void showSearchResults();
|
||||
void searchResultsDone(const MTPmessages_FoundStickerSets &result);
|
||||
void searchStickersResultsDone(const MTPmessages_FoundStickers &result);
|
||||
void refreshSearchRows();
|
||||
void refreshSearchRows(const std::vector<uint64> *cloudSets);
|
||||
void fillFilteredStickersRow();
|
||||
void fillLocalSearchRows(const QString &query);
|
||||
void fillCloudSearchRows(const std::vector<uint64> &cloudSets);
|
||||
void fillFoundStickersRow(const std::vector<DocumentId> &stickerIds);
|
||||
void addSearchRow(not_null<Data::StickersSet*> set);
|
||||
void toggleSearchLoading(bool loading);
|
||||
|
||||
@@ -442,11 +443,14 @@ private:
|
||||
std::vector<not_null<DocumentData*>> _filteredStickers;
|
||||
std::vector<EmojiPtr> _filterStickersCornerEmoji;
|
||||
rpl::variable<int> _recentShownCount;
|
||||
std::map<QString, std::vector<uint64>> _searchCache;
|
||||
std::map<QString, std::vector<uint64>> _searchSetsCache;
|
||||
std::map<QString, std::vector<DocumentId>> _searchStickersCache;
|
||||
std::vector<std::pair<uint64, QStringList>> _searchIndex;
|
||||
base::Timer _searchRequestTimer;
|
||||
QString _searchQuery, _searchNextQuery;
|
||||
mtpRequestId _searchRequestId = 0;
|
||||
mtpRequestId _searchSetsRequestId = 0;
|
||||
mtpRequestId _searchStickersRequestId = 0;
|
||||
bool _searchLoading = false;
|
||||
|
||||
rpl::event_stream<FileChosen> _chosen;
|
||||
rpl::event_stream<> _scrollUpdated;
|
||||
|
||||
Reference in New Issue
Block a user