Skip to content
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

[WIP] Core now adds a ~ by itself #3520

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

[WIP] Core now adds a ~ by itself #3520

wants to merge 1 commit into from

Conversation

Hocuri
Copy link
Collaborator

@Hocuri Hocuri commented Jan 6, 2025

This PR is not meant to change user-visible behavior, we just shifted the responsibility to add the "~" to core. (without this PR, the name would be "~~Alice" sometimes)

WIP until deltachat/deltachat-core-rust#6411 is merged.

Companion for
deltachat/deltachat-core-rust#6411. This PR is not
meant to change user-visible behavior, we just shifted the
responsibility to add the "~" to core. (without this PR, the name would
be "~~Alice" sometimes)
@adbenitez
Copy link
Member

adbenitez commented Jan 6, 2025

tbh, I am a bit skeptical of making core put ~ in front of names, the clients could decide to use different ways to display this information, like using a different color or separated element, or a completely different signal like an icon etc

@r10s
Copy link
Member

r10s commented Jan 6, 2025

the clients could decide to use different ways to display this information

but they do not and did not all the years 🤷‍♂️ - cross platform consistency is also easier by a prefix. also, having a simple approach as a prefixed character, works better for notifications and other places we do not have so much control about the appearance (eg. reaction strings as "NAME reacted 🤷‍♂️ to MSG")

so, i think, that part is fine, if we agree to prefix virtually all names by ~ - worth a test, maybe fine. thb, i am more sceptical by force-asking setting a name after a qr-code scan, as suggested at deltachat/deltachat-core-rust#6411 and if the improvement is worth the additional effort on the user's side. but let's see, i also did not follow recent discussions there

@adbenitez
Copy link
Member

I am not talking about official client only

@adbenitez
Copy link
Member

and even in WhatsApp where this idea was copied from, the ~ is displayed more specially separated from the name

@adbenitez
Copy link
Member

problems I can see coming: generation of the avatar letters if the name given by core always starts with ~

@r10s
Copy link
Member

r10s commented Jan 6, 2025

problems I can see coming: generation of the avatar letters if the name given by core always starts with ~

that's a point

Copy link

github-actions bot commented Jan 6, 2025

To test the changes in this pull request, install this apk:
📦 app-preview.apk

@Simon-Laux
Copy link
Member

Simon-Laux commented Jan 12, 2025

problems I can see coming: generation of the avatar letters if the name given by core always starts with ~

we can have a new api returning the initials for avatar generation.

message parser has methods that can help us with taking exactly the first emoji (parser::is_emoji::emoji (nom parser eating first emoji) and parser::is_emoji::get_first_emoji(text)), we could make a function there that also works for other characters that consist of multiple utf8 chars - or copy the function or use some utf8 graphemes crate to do the job of correctly getting the first symbol/letter/emoji.

Or easiest would be probably a new field/property that tells his to add ~? kinda like can_send, in the way that it is a combination of multiple possible reasons in one boolean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants