Skip to content

Commit 001f285

Browse files
authored
Merge pull request #4206 from rdjuric/correctEmojiRepresentation
Correct emoji presentation on emoji picker
2 parents 3d35169 + d4dc903 commit 001f285

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/pages/home/report/EmojiPickerMenu/index.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,9 @@ class EmojiPickerMenu extends Component {
298298
/**
299299
* Given an emoji item object, render a component based on its type.
300300
* Items with the code "SPACER" return nothing and are used to fill rows up to 8
301-
* so that the sticky headers function properly
301+
* so that the sticky headers function properly.
302+
* We add '\uFE0F' to our unicode to force the correct emoji presentation (VS16)
303+
* on emojis that also have a text style presentation (VS15).
302304
*
303305
* @param {Object} item
304306
* @param {Number} index
@@ -313,7 +315,7 @@ class EmojiPickerMenu extends Component {
313315
if (header) {
314316
return (
315317
<Text style={styles.emojiHeaderStyle}>
316-
{code}
318+
{`${code}\uFE0F`}
317319
</Text>
318320
);
319321
}
@@ -322,7 +324,7 @@ class EmojiPickerMenu extends Component {
322324
<EmojiPickerMenuItem
323325
onPress={this.props.onEmojiSelected}
324326
onHover={() => this.setState({highlightedIndex: index})}
325-
emoji={code}
327+
emoji={`${code}\uFE0F`}
326328
isHighlighted={index === this.state.highlightedIndex}
327329
emojiSize={this.emojiSize}
328330
/>

src/pages/home/report/EmojiPickerMenu/index.native.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,15 @@ class EmojiPickerMenu extends Component {
5858
if (item.header) {
5959
return (
6060
<Text style={styles.emojiHeaderStyle}>
61-
{item.code}
61+
{`${item.code}\uFE0F`}
6262
</Text>
6363
);
6464
}
6565

6666
return (
6767
<EmojiPickerMenuItem
6868
onPress={this.props.onEmojiSelected}
69-
emoji={item.code}
69+
emoji={`${item.code}\uFE0F`}
7070
emojiSize={this.emojiSize}
7171
/>
7272
);

0 commit comments

Comments
 (0)