Skip to content

Commit

Permalink
Use sticker body for searching (#1347)
Browse files Browse the repository at this point in the history
  • Loading branch information
greentore committed Jul 23, 2023
1 parent f14d70e commit 1a37fd0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/app/components/emoji-board/EmojiBoard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,13 @@ export const NativeEmojiGroups = memo(
)
);

const getSearchListItemStr = (item: ExtendedPackImage | IEmoji) => `:${item.shortcode}:`;
const getSearchListItemStr = (item: ExtendedPackImage | IEmoji) => {
const shortcode = `:${item.shortcode}:`;
if ('body' in item) {
return [shortcode, item.body ?? ''];
}
return shortcode;
};
const SEARCH_OPTIONS: UseAsyncSearchOptions = {
limit: 26,
matchOptions: {
Expand Down

0 comments on commit 1a37fd0

Please sign in to comment.