you-apps / ConnectYou

Privacy focused contacts and SMS messenger app built with MD3
https://you-apps.net
GNU General Public License v3.0
517 stars 21 forks source link

Preferred number and other improvements #38

Closed Surendrajat closed 1 year ago

Surendrajat commented 1 year ago

Things I noticed so far:

Surendrajat commented 1 year ago

@Bnyro the last one is still not fixed. Should I open another issue?

Bnyro commented 1 year ago

Oh, you edited it? I thought there only were two points on your list before that both got resolved by the PR :)

MahmoudRH commented 1 year ago

I think for the third point we can add a new field for the default number. We can make it take the first entered number by default and then add an option to modify it.

Bnyro commented 1 year ago

I think for the third point we can add a new field for the default number. We can make it take the first entered number by default and then add an option to modify it.

Agreed, we should keep it simple by always using the first number available and allow users to modify their order, most likely in the already existing editor.

Surendrajat commented 1 year ago

There's already a PREF key in vCard specification (and in my contact list too, I checked) which tells you the preference of properties(numbers). I think it should be used for this feature.

Example:

TEL;TYPE=CELL;PREF=1:+XXYYYYYY
TEL;TYPE=CELL:+XXYYYYYY

ref: https://www.rfc-editor.org/rfc/rfc6350#section-5.3

Bnyro commented 1 year ago

The number chosen is always the first one of the contact. You can move a number to the top by long pressing the type field next to it in the editor (e.g. "custom"). The Vcard library we are using doesn't support the PREF field, so there's nothing we can do about preferred numbers in Vcards.

Surendrajat commented 1 year ago

@Bnyro is it the same library you're using? https://github.com/mangstadt/ez-vcard/wiki/Version-differences#23-ez-vcards-approach

Bnyro commented 1 year ago

Yes, thanks for linking that, with https://github.com/Bnyro/ConnectYou/commit/d42f778773e139b7476f275c9f26389a4e02c16d we should now import numbers being PREF as the first one.

Surendrajat commented 1 year ago

Thanks @Bnyro! Does it also work for vCard export?

Bnyro commented 1 year ago

It should with the most recent commit :)

Surendrajat commented 1 year ago

lol.. thanks a lot.