-
-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to Unicode Emoji v15.1 #583
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many thanks!
@@ -1,54 +1,62 @@ | |||
156 | |||
:grinning: 😀 grinning face |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first part was used to name emojis internally and was used when saving the most commonly used emojis. This will make some of the saved emojis disappear.
Though, I don't want to slow this down, instead I'd prefer to improve the way emojis are handled internally.
Here's my idea:
- The emoji names would be extracted from the previous version of this file and would be saved a new file. This will be used to migrate the saved information.
- The "last used emojis" feature would save the emojis characters directly and not their names.
- This file is kept as it is for easier upgrade in the future (or changed to be easier to upgrade) but is no longer embedded in the app. A smaller file is generated at test-time containing the data that should be embedded in the app (the grouped emojis without name and description). This should make the app slightly smaller and faster.
- The names and descriptions of emojis are otherwise not needed internally and should not be loaded by the app.
srcs/juloo.keyboard2/Emoji.java
is removed,KeyValue
is used instead.
The emoji descriptions could be added to the app later if they are needed.
What do you think ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switching to a more compact emoji implementation should be pretty straightforward. I'll review Unicode's documentation to make sure it's reasonably future proof.
As for the recent emojis, I think it would suffice to hardcode a map from the old names to the characters and remove it at a later date when most users' SharedPreferences have been updated.
Thanks for the insight! It might be a week or two until I can get around to it, but I'll open a new PR when I have something to show.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for looking into it :)
As for the recent emojis, I think it would suffice to hardcode a map from the old names to the characters and remove it at a later date when most users' SharedPreferences have been updated.
Yes!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, the old names might be useful data for future features.
My preferred way to build a map in Java is to use a case
when the same key is accessed infrequently. Similarly to KeyValue: https://github.com/Julow/Unexpected-Keyboard/blob/master/srcs/juloo.keyboard2/KeyValue.java#L345
No, thank you! This app and your work on it have been indispensable to me for years now. I'm just happy to finally make a small contribution. |
Resolves #572