diff --git a/src/components/category.js b/src/components/category.js index 6267924..37843e6 100644 --- a/src/components/category.js +++ b/src/components/category.js @@ -72,10 +72,19 @@ export default class Category extends React.Component { var { name, emojis, perLine } = this.props if (name == 'Recent') { + let { custom } = this.props let frequentlyUsed = frequently.get(perLine) if (frequentlyUsed.length) { - emojis = frequentlyUsed + emojis = frequentlyUsed.map((id) => { + for (let emoji of custom) { + if (emoji.id === id) { + return emoji + } + } + + return id + }) } } diff --git a/src/components/picker.js b/src/components/picker.js index dd12eed..ebfa418 100644 --- a/src/components/picker.js +++ b/src/components/picker.js @@ -12,7 +12,7 @@ import { Anchors, Category, Emoji, Preview, Search } from '.' const RECENT_CATEGORY = { name: 'Recent', emojis: null } const SEARCH_CATEGORY = { name: 'Search', emojis: null, anchor: false } -const CUSTOM_CATEGORY = { name: 'Custom', emojis: null } +const CUSTOM_CATEGORY = { name: 'Custom', emojis: [] } const I18N = { search: 'Search', @@ -357,6 +357,7 @@ export default class Picker extends React.Component { native={native} hasStickyPosition={this.hasStickyPosition} i18n={this.i18n} + custom={category.name == 'Recent' ? CUSTOM_CATEGORY.emojis : undefined} emojiProps={{ native: native, skin: skin,