deltachat / deltachat-android

Email-based instant messaging for Android.
GNU General Public License v3.0
1.15k stars 148 forks source link

After backup restore, 1:1 chat name overridden manually (by user) before changes to name of corresponding email contact in Android address book when message from respective contact is received #2871

Closed gerryfrancis closed 1 year ago

gerryfrancis commented 1 year ago
r10s commented 1 year ago

while trying to reproduce the issue, there is a more general bug even sooner:

interestingly, when then trying to create the same chat again the same way (which will just open the existing chat), the name is set correctly. when you then delete the chat and try over, the name is wrong again

the following screencast is from 1.40.0:

https://github.com/deltachat/deltachat-android/assets/9800740/905cd455-2fa1-4931-af8e-8c0c40eba179

gerryfrancis commented 1 year ago

@r10s Looks like the email address is displayed every time the contact name is not applied, or chat name = NULL for whatever reason (race condition?).

adbenitez commented 1 year ago

I am not sure this is 100% a bug, if you have a name set in phone contacts that should be used and if you want to change it you should change it there, setting the name in delta chat is mainly for the contacts you don't have in your address book :thinking:

gerryfrancis commented 1 year ago

@adbenitez Although I agree with your point that contact names should be changed in the Android address book, there might be reasons why someone changes them in the app itself, and that these names should be maintained as overrides, otherwise it would not make much sense to let the user edit names for contacts who have already been read from the address book.

But hey, I think the APK from the PR seems to solve the issue, I need to test it on the device of my mate who experienced the problem. Will keep you updated... :)