fix(composer-emoji): Only show replacement PNGs for OS X

This commit is contained in:
Jackie Luo 2016-03-25 13:35:32 -07:00
parent 872aae1bcd
commit cbf9627029
3 changed files with 3 additions and 3 deletions

View file

@ -269,7 +269,7 @@ class EmojiButtonPopover extends React.Component {
ctx.fillStyle = 'black';
if (this.state.categorizedEmoji[category].length === 0) return;
this.state.categorizedEmoji[category].forEach((emojiName, j) => {
if (missingEmojiList.indexOf(emojiName) === -1) {
if (process.platform === "darwin" && missingEmojiList.indexOf(emojiName) === -1) {
const emojiChar = emoji.get(emojiName);
ctx.fillText(emojiChar, position.x, position.y);
} else {

View file

@ -205,7 +205,7 @@ class EmojiComposerExtension extends ComposerExtension {
}
}
const emojiChar = emoji.get(emojiName);
if (missingEmojiList.indexOf(emojiName) !== -1) {
if (process.platform === "darwin" && missingEmojiList.indexOf(emojiName) !== -1) {
const html = `<span class="missing-emoji ${emojiName}"><img
src="images/composer-emoji/missing-emoji/${emojiName}.png"
width="14"

View file

@ -35,7 +35,7 @@ class EmojiPicker extends React.Component {
this.props.emojiOptions.forEach((emojiOption, i) => {
const emojiClass = emojiIndex === i ? "btn btn-icon emoji-option" : "btn btn-icon";
let emojiChar = emoji.get(emojiOption);
if (missingEmojiList.indexOf(emojiOption) !== -1) {
if (process.platform === "darwin" && missingEmojiList.indexOf(emojiOption) !== -1) {
emojiChar = (<img
src={`images/composer-emoji/missing-emoji/${emojiOption}.png`}
width="16"