mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 21:24:59 +08:00
Deduplicate recent emoji
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
65954b1e1b
commit
cf071c5ac6
@ -47,10 +47,10 @@ class EmojiPicker extends React.Component {
|
||||
viewportHeight: 280,
|
||||
};
|
||||
|
||||
// Convert recent emoji characters to emoji data, removing unknowns.
|
||||
this.recentlyUsed = recent.get()
|
||||
// Convert recent emoji characters to emoji data, removing unknowns and duplicates
|
||||
this.recentlyUsed = Array.from(new Set(recent.get()
|
||||
.map(unicode => getEmojiFromUnicode(unicode))
|
||||
.filter(data => !!data);
|
||||
.filter(data => !!data)));
|
||||
this.memoizedDataByCategory = {
|
||||
recent: this.recentlyUsed,
|
||||
...DATA_BY_CATEGORY,
|
||||
|
Loading…
Reference in New Issue
Block a user