release
Etienne Lemay 2017-11-07 19:09:40 -08:00
parent 153f02b18f
commit b24b0ccee5
2 changed files with 11 additions and 11 deletions

View File

@ -101,18 +101,20 @@ export default class Category extends React.Component {
let frequentlyUsed = recent || frequently.get(perLine)
if (frequentlyUsed.length) {
emojis = frequentlyUsed.map(id => {
const emoji = custom.filter(e => e.id === id)[0]
if (emoji) {
return emoji
}
emojis = frequentlyUsed
.map(id => {
const emoji = custom.filter(e => e.id === id)[0]
if (emoji) {
return emoji
}
return id
}).filter(id => !!getData(id))
return id
})
.filter(id => !!getData(id))
}
if (emojis.length === 0 && frequentlyUsed.length > 0) {
return null;
return null
}
}

View File

@ -465,9 +465,7 @@ export default class Picker extends React.PureComponent {
native={native}
hasStickyPosition={this.hasStickyPosition}
i18n={this.i18n}
recent={
category.name == 'Recent' ? recent : undefined
}
recent={category.name == 'Recent' ? recent : undefined}
custom={
category.name == 'Recent' ? CUSTOM_CATEGORY.emojis : undefined
}