Add categories for custom emojis (#11196)

Fix #7940
This commit is contained in:
Eugen Rochko
2019-06-28 15:54:10 +02:00
committed by GitHub
parent 072158ee97
commit e64e6a03dd
13 changed files with 86 additions and 18 deletions

View File

@ -92,8 +92,11 @@ export const buildCustomEmojis = (customEmojis) => {
keywords: [name],
imageUrl: url,
custom: true,
customCategory: emoji.get('category'),
});
});
return emojis;
};
export const categoriesFromEmojis = customEmojis => customEmojis.reduce((set, emoji) => set.add(emoji.get('category') ? `custom-${emoji.get('category')}` : 'custom'), new Set());