Merge pull request #3806 from matrix-org/t3chguy/dedup_recent_emoji
Deduplicate recent emojipull/21833/head
commit
ffd09e42bd
|
@ -47,10 +47,8 @@ class EmojiPicker extends React.Component {
|
|||
viewportHeight: 280,
|
||||
};
|
||||
|
||||
// Convert recent emoji characters to emoji data, removing unknowns.
|
||||
this.recentlyUsed = recent.get()
|
||||
.map(unicode => getEmojiFromUnicode(unicode))
|
||||
.filter(data => !!data);
|
||||
// Convert recent emoji characters to emoji data, removing unknowns and duplicates
|
||||
this.recentlyUsed = Array.from(new Set(recent.get().map(getEmojiFromUnicode).filter(Boolean)));
|
||||
this.memoizedDataByCategory = {
|
||||
recent: this.recentlyUsed,
|
||||
...DATA_BY_CATEGORY,
|
||||
|
|
Loading…
Reference in New Issue