Improve sticker loading

This commit is contained in:
2024-09-16 21:00:19 +08:00
parent 152efd97a0
commit 029e72fb0b
3 changed files with 48 additions and 41 deletions

View File

@@ -405,12 +405,9 @@ class _ChatMessageInputState extends State<ChatMessageInput> {
if (emojiMatch != null) {
final StickerProvider stickers = Get.find();
final emoteSearch = emojiMatch[2]!;
return stickers.availableStickers
.where(
(x) => x.textWarpedPlaceholder
.toUpperCase()
.contains(emoteSearch.toUpperCase()),
)
final result = await stickers
.searchStickerByAlias(emoteSearch.substring(1));
return result
.map(
(x) => ChatMessageSuggestion(
type: 'emotes',