From b24b0ccee563f91d292ddfd0016ef02916c2413e Mon Sep 17 00:00:00 2001 From: Etienne Lemay Date: Tue, 7 Nov 2017 19:09:40 -0800 Subject: [PATCH] :lipstick: --- src/components/category.js | 18 ++++++++++-------- src/components/picker.js | 4 +--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/components/category.js b/src/components/category.js index 86208eb..9a8dd43 100644 --- a/src/components/category.js +++ b/src/components/category.js @@ -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 } } diff --git a/src/components/picker.js b/src/components/picker.js index afcc8f6..53672bb 100644 --- a/src/components/picker.js +++ b/src/components/picker.js @@ -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 }