mirror of
https://github.com/array-in-a-matrix/xinny.git
synced 2024-05-19 12:50:17 -04:00
remove twemoji
This commit is contained in:
parent
d21f008bf9
commit
60e9f22066
|
@ -46,8 +46,7 @@ const EmojiGroup = React.memo(({ name, groupEmojis }) => {
|
|||
emojiRow.push(
|
||||
<span key={emojiIndex}>
|
||||
{emoji.hexcode ? (
|
||||
// This is a unicode emoji, and should not be rendered with twemoji
|
||||
emoji.unicode
|
||||
parse(emoji.unicode)
|
||||
) : (
|
||||
// This is a custom emoji, and should be render as an mxc
|
||||
<img
|
||||
|
@ -278,7 +277,7 @@ function EmojiBoard({ onSelect, searchRef }) {
|
|||
);
|
||||
})}
|
||||
</div>
|
||||
<div>
|
||||
<div className="emoji-board__nav-twemoji">
|
||||
{[
|
||||
[0, EmojiIC, 'Smilies'],
|
||||
[1, DogIC, 'Animals'],
|
||||
|
@ -327,7 +326,7 @@ function EmojiBoard({ onSelect, searchRef }) {
|
|||
</ScrollView>
|
||||
</div>
|
||||
<div ref={emojiInfo} className="emoji-board__content__info">
|
||||
<div>{'🙂'}</div>
|
||||
<div>{parse('🙂')}</div>
|
||||
<Text>:slight_smile:</Text>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -48,6 +48,11 @@ function renderSuggestions({ prefix, option, suggestions }, fireCmd) {
|
|||
function renderEmojiSuggestion(emPrefix, emos) {
|
||||
const mx = initMatrix.matrixClient;
|
||||
|
||||
// Renders a small Twemoji
|
||||
function renderTwemoji(emoji) {
|
||||
return parse(emoji.unicode);
|
||||
}
|
||||
|
||||
// Render a custom emoji
|
||||
function renderCustomEmoji(emoji) {
|
||||
return (
|
||||
|
@ -60,9 +65,12 @@ function renderSuggestions({ prefix, option, suggestions }, fireCmd) {
|
|||
);
|
||||
}
|
||||
|
||||
// Dynamically render either a custom emoji
|
||||
// Dynamically render either a custom emoji or twemoji based on what the input is
|
||||
function renderEmoji(emoji) {
|
||||
return renderCustomEmoji(emoji);
|
||||
if (emoji.mxc) {
|
||||
return renderCustomEmoji(emoji);
|
||||
}
|
||||
return renderTwemoji(emoji);
|
||||
}
|
||||
|
||||
return emos.map((emoji) => (
|
||||
|
@ -92,7 +100,7 @@ function renderSuggestions({ prefix, option, suggestions }, fireCmd) {
|
|||
});
|
||||
}}
|
||||
>
|
||||
<Text variant="b2">{}</Text>
|
||||
<Text variant="b2">{twemojify(member.name)}</Text>
|
||||
</CmdItem>
|
||||
));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue