You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Emoji only messages consisting of only a few emojis should be displayed in a bigger font-size than other messages on all platforms, afaik android and desktop have this, iOS does not have it yet.
Having this method would mean we can get rid of the emoji-regex desktop dependency (which is 140kb in size). UPDATE: Already used the new regex and removed the dependency in deltachat/deltachat-desktop#3102. Still it makes sense to go for a unified solution for all platforms, especially as the unicode emoji counter method is not implemented in Firefox (https://stackoverflow.com/a/72915759), and such an api might not even be available on older androids.
I think it makes not much change to check size in this method, you should check it before, because passing a long string to the function (especially over language barriers like wasm or jsonrpc) also takes time. So we should rather check the length before.
Emoji only messages consisting of only a few emojis should be displayed in a bigger font-size than other messages on all platforms, afaik android and desktop have this, iOS does not have it yet.
Basically we would move this method to the message parser and make it more efficient
https://github.com/deltachat/deltachat-desktop/blob/308c598d1e615425cad8bee3daadfc84382b384c/src/renderer/components/conversations/emoji.ts#L50-L69
the method could return an enum or number representing the size.
for emoji parsing we could check for character ranges like described here: https://medium.com/reactnative/emojis-in-javascript-f693d0eb79fb (discord recommended that regex in their blog: https://discord.com/blog/how-discord-achieves-native-ios-performance-with-react-native)
Having this method would mean we can get rid of theemoji-regex
desktop dependency (which is 140kb in size).UPDATE: Already used the new regex and removed the dependency in deltachat/deltachat-desktop#3102. Still it makes sense to go for a unified solution for all platforms, especially as the unicode emoji counter method is not implemented in Firefox (https://stackoverflow.com/a/72915759), and such an api might not even be available on older androids.
For rust there is this crate that we could use: https://crates.io/crates/unicode-segmentation
The text was updated successfully, but these errors were encountered: