vanniktech / Emoji

A library to add Emoji support to your Android / iOS / JVM Application
Apache License 2.0
1.51k stars 290 forks source link

Request: add an API for filtering out unwanted emojis by name string #1074

Closed adi-vizgan-unplugged closed 2 months ago

adi-vizgan-unplugged commented 2 months ago

Request: add an API for filtering out unwanted emojis by name string. The feature should have some kind on an API that allows you to input strings to it, and any emojis that contains these strings will not be populated to the emoji view.

vanniktech commented 2 months ago

Just roll your own Emoji Provider where you aren't providing them.

adi-vizgan-unplugged commented 2 months ago

@vanniktech Didn't think of that, thanks! I copied the Google emoji provider which is the one I use and removed the unwanted emojis from it, and passed it to the install method and it works!

vanniktech commented 2 months ago

You could also write your own Emoji Provider and inside instantiate the one from Google and filter out the emojis you don't want. That way you don't have to copy all the code and can filter just like you want to.