Comments (7)
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)
}
from elegant-emoji-picker.
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.
from elegant-emoji-picker.
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.
from elegant-emoji-picker.
Great! I'll make methods public later so you could do this natively.
from elegant-emoji-picker.
Thanks so much for your responsive behaviour 🚀
from elegant-emoji-picker.
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.
from elegant-emoji-picker.
I forked and changed the code as you said. Thanks a lot!
from elegant-emoji-picker.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elegant-emoji-picker.