Don't brake text-based emoticons

Classic emoticons are cool “8-)” DC have some of them, but the issue is that they are can be broken if the line is too long, I suggest to treat them as an unit(as a word) and if they are at the end of the line wrap the full emoticon, other wise they are broken in two parts by the change of line ("\n")

Expected behavior

DC don’t brake emoticons, in long lines
☜(゚ヮ゚☜)

Actual behavior

DC brake emoticons, in long lines ☜(゚
ヮ゚☜)

1 Like

while this would be cool, i fear this is not that easily doable. however, maybe someone likes to try that :slight_smile:

1 Like

When we implement markdown in android we probably need to parse and structure the text in a different way anyway, so I would postpone this until then.

Discord made a lib for it: https://github.com/discordapp/simpleast (apache 2 license i think, maybe we can use it as reference)

2 Likes

ok, this is not the big deal anyway, just something nice to have :wink:
Schiminieee markdown? will be really nice to have that!!

1 Like

A little (a lot) offtopic, but we could expand the text-based emojis database too

Gboard comes with a BIG amount of this kind of emoticons

Unicode is also supported in most non-DC MUAs and emojis are unicode characters.

 Example: 😉
1 Like

Sorry I was just show him this part “but we could expand the text-based emojis database too” of a proposition in other thread, but thanks for that reply

I think we might have an simpler solution than message parsing them (because when parsing them we need to enclose them into sth invisible, because otherwise we can’t distinguish them from normal text):
when adding them via the internal keyboard we replace spaces by https://en.wikipedia.org/wiki/Non-breaking_space and defining positions where it shouldn’t break https://en.wikipedia.org/wiki/Word_joiner.
This change can be simply made in the “database” (https://github.com/deltachat/deltachat-android/blob/91be337fb68cb75712c64a3d01b94409329af675/src/org/thoughtcrime/securesms/components/emoji/EmojiPages.java#L37), shouldn’t be that much work:
Inserting \u2060 at the places no line-break should be.

☜⁠(゚⁠ヮ゚☜) <- @adbenitez try this one

submitted a patch for this:

But in the future we should think about providing the text emoticons list from a seperate file or somehow from the core or interface repo to have these emoticons on all platforms.
Also then we could add the wordjoiner char (\u2060) programaticaly to maybe save some space / make the emoticon source file more readable.

1 Like