2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Search stickers by emoji.

This commit is contained in:
John Preston
2023-01-24 18:46:16 +04:00
parent 65b1a0c9a4
commit c48ac28204
11 changed files with 161 additions and 85 deletions

View File

@@ -365,10 +365,8 @@ inline int indexOfInFirstN(const T &v, const U &elem, int last) {
}
FieldAutocomplete::StickerRows FieldAutocomplete::getStickerSuggestions() {
const auto list = _controller->session().data().stickers().getListByEmoji(
_emoji,
_stickersSeed
);
const auto data = &_controller->session().data().stickers();
const auto list = data->getListByEmoji({ _emoji }, _stickersSeed);
auto result = ranges::views::all(
list
) | ranges::views::transform([](not_null<DocumentData*> sticker) {