You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-17 17:42:41 +03:00
Deduplicate recent emoji
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@@ -47,10 +47,10 @@ class EmojiPicker extends React.Component {
|
|||||||
viewportHeight: 280,
|
viewportHeight: 280,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Convert recent emoji characters to emoji data, removing unknowns.
|
// Convert recent emoji characters to emoji data, removing unknowns and duplicates
|
||||||
this.recentlyUsed = recent.get()
|
this.recentlyUsed = Array.from(new Set(recent.get()
|
||||||
.map(unicode => getEmojiFromUnicode(unicode))
|
.map(unicode => getEmojiFromUnicode(unicode))
|
||||||
.filter(data => !!data);
|
.filter(data => !!data)));
|
||||||
this.memoizedDataByCategory = {
|
this.memoizedDataByCategory = {
|
||||||
recent: this.recentlyUsed,
|
recent: this.recentlyUsed,
|
||||||
...DATA_BY_CATEGORY,
|
...DATA_BY_CATEGORY,
|
||||||
|
|||||||
Reference in New Issue
Block a user