Skip to content

Commit

Permalink
💄
Browse files Browse the repository at this point in the history
  • Loading branch information
EtienneLem committed Nov 8, 2017
1 parent 153f02b commit b24b0cc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
20 changes: 11 additions & 9 deletions src/components/category.js
Expand Up @@ -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
}

return id
}).filter(id => !!getData(id))
emojis = frequentlyUsed
.map(id => {
const emoji = custom.filter(e => e.id === id)[0]
if (emoji) {
return emoji
}

return id
})
.filter(id => !!getData(id))
}

if (emojis.length === 0 && frequentlyUsed.length > 0) {
return null;
return null
}
}

Expand Down
4 changes: 1 addition & 3 deletions src/components/picker.js
Expand Up @@ -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
}
Expand Down

0 comments on commit b24b0cc

Please sign in to comment.