signalapp / Flock

Private contact and calendar sync for Android.
https://signal.org/blog/flock
358 stars 80 forks source link

Merged Contacts #69

Closed Ste4thOverride closed 10 years ago

Ste4thOverride commented 10 years ago

After Merging/Joining contacts and then syncing again using Flock the contacts are un-merged into two separate contacts again. This issue occurs on the Nexus 5 Flock version 0.8.7. Correct action is for merged/joined contacts to remain linked after sync.

rhodey commented 10 years ago

@Ste4thOverride I can reproduce this behavior through the following steps.

  1. open the People app
  2. select a contact that belongs to two or more accounts including Flock
  3. tap "Separate"
  4. edit any field within the separated Flock contact
  5. after sync contacts will be joined.

Labelling as "bug", will look into this as soon as possible. Thanks for opening this issue @Ste4thOverride :)

rhodey commented 10 years ago

Looks like this is probably an issue with Flock no persisting "ContactsContract.AggregationExceptions" columns

Will likely need to define a new VCard X-* property but first going to check if some existing property already exists for this or similar purpose.

rhodey commented 10 years ago

will merge branch issue-69 with master and mark this as resolved as soon as I test this patch with "local contacts" and make sure everything works there as well.

rhodey commented 10 years ago

Unfortunately in the case of "local contacts" there is no way for Flock to work correctly with the "separate" & "join" contact edit actions available from the Android "People" app. I'll try to explain why:

All contacts have two IDs, one that is guaranteed to be unique per device (_ID) and another that is guaranteed to be unique per account (SOURCE), this is not a Flock thing this is how the Android contact database is designed. Flock always has to use the SOURCE id when referencing contacts because the contacts may exist across multiple devices. The SOURCE id of "local contacts" is always null and because of this there is no way to for Flock to say that "this contact is separate from this contact" on more than one device because there is no unique identifier to count on.