commit: 98146281e1beaf994710b13ef70f6224e8588cba
parent b08ab329f4d149fd414e0539574f49062c571a8a
Author: Harmon <Harmon758@gmail.com>
Date: Sat, 7 Apr 2018 07:53:11 -0500
Remove duplicate frequently used emojis (#7064)
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/app/javascript/mastodon/features/compose/containers/emoji_picker_dropdown_container.js b/app/javascript/mastodon/features/compose/containers/emoji_picker_dropdown_container.js
@@ -38,7 +38,8 @@ const getFrequentlyUsedEmojis = createSelector([
.toArray();
if (emojis.length < DEFAULTS.length) {
- emojis = emojis.concat(DEFAULTS.slice(0, DEFAULTS.length - emojis.length));
+ let uniqueDefaults = DEFAULTS.filter(emoji => !emojis.includes(emoji));
+ emojis = emojis.concat(uniqueDefaults.slice(0, DEFAULTS.length - emojis.length));
}
return emojis;