Fix emoji search due to version change

This commit is contained in:
Bojan Mojsilovic 2023-09-14 14:51:15 +02:00
parent caec3d415d
commit e306b5c414
3 changed files with 7 additions and 7 deletions

View File

@ -947,7 +947,7 @@ const EditBox: Component<{
// Get index of the token and insert emoji character
const index = msg.slice(0, cursor).lastIndexOf(':');
const value = msg.slice(0, index) + emoji.char + msg.slice(cursor);
const value = msg.slice(0, index) + emoji.name + msg.slice(cursor);
// Reset query, update message and text area value
setMessage(value);
@ -1191,7 +1191,7 @@ const EditBox: Component<{
class={`${styles.emojiOption} ${highlightedEmoji() === index() ? styles.highlight : ''}`}
onClick={() => selectEmoji(emoji)}
>
{emoji.char}
{emoji.name}
</button>
)}
</For>

View File

@ -759,7 +759,7 @@ const Messages: Component = () => {
// Get index of the token and insert emoji character
const index = msg.slice(0, cursor).lastIndexOf(':');
const value = msg.slice(0, index) + emoji.char + msg.slice(cursor);
const value = msg.slice(0, index) + emoji.name + msg.slice(cursor);
// Reset query, update message and text area value
setMessage(value);
@ -1014,7 +1014,7 @@ const Messages: Component = () => {
class={`${styles.emojiOption} ${highlightedEmoji() === index() ? styles.highlight : ''}`}
onClick={() => selectEmoji(emoji)}
>
{emoji.char}
{emoji.name}
</button>
)}
</For>

View File

@ -525,9 +525,9 @@ export type UserRelation = 'follows' | 'other' | 'any';
export type EmojiOption = {
keywords: string[],
char: string,
fitzpatrick_scale: boolean,
category: string,
char?: string,
fitzpatrick_scale?: boolean,
category?: string,
name: string,
};