Open hidoon opened 1 year ago
In a hypothetical future when all starts align.
For now though, you can extend functionality your self with emojiPicker(_: loadEmojiSections : withConfiguration : withLocalization)
to insert your own recent emojis category.
It seems like loadEmojiSections replaces all other emojis. I wish I was able to just add another category section. Thanks so much for reply btw.
You can get all emojis with ElegantEmojiPicker.getAllEmoji()
, but they will not be sorted into categories.
For now, you can fork the repo and modify the private setupEmojiSections(config: ElegantConfiguration, localization: ElegantLocalization)
method to insert your recent emoji section.
Its a good idea for me to make it public. Thanks.
I forked and changed the code as you said. Thanks a lot!
Great! I'll make methods public later so you could do this natively.
getDefaultEmojiSections()
is now public, so you can append your section natively like so:
func emojiPicker(_ picker: ElegantEmojiPicker, loadEmojiSections withConfiguration: ElegantConfiguration, _ withLocalization: ElegantLocalization) -> [EmojiSection] {
let allEmojis = ElegantEmojiPicker.getAllEmoji()
let politeEmojis = allEmojis.filter({
$0.emoji == "🖕" ||
$0.emoji == "👊" ||
$0.emoji == "🤬"
})
return [EmojiSection(title: "Politeness", icon: UIImage(systemName: "heart"), emojis: politeEmojis)] + ElegantEmojiPicker.getDefaultEmojiSections(config: withConfiguration, localization: withLocalization)
}
Thanks so much for your responsive behaviour 🚀
Will there be recent emojis category?