mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
Remove duplicate frequently used emojis (#7064)
This commit is contained in:
parent
b08ab329f4
commit
98146281e1
@ -38,7 +38,8 @@ const getFrequentlyUsedEmojis = createSelector([
|
|||||||
.toArray();
|
.toArray();
|
||||||
|
|
||||||
if (emojis.length < DEFAULTS.length) {
|
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;
|
return emojis;
|
||||||
|
Loading…
Reference in New Issue
Block a user