Re: Linking Operation



On Wed, 2011-11-02 at 10:28 -0500, Erick Pérez Castellanos wrote:
> > Also, the actual linking code isn't exactly "simple", but I don't think
> > you need to touch that for the new UI.
> About that I'm trying to come up with a way of make Undo operation
> generic, so I need to understand linking code, since delete operation is
> kinda explained in [https://bugzilla.gnome.org/show_bug.cgi?id=657974]
> I saw the linking code is adding to the primary persona of the main
> contact the details from the other one, or, if not main persona is
> founded in both contact, then a new one is created.
> Why I can't see is where you delete the secondary Contact object, cause
> as far as I see, there's no deletion of the persona, not removing the
> details either (thinking that the persona could remove itself when not
> details got left).
> 
> Can u share some inside into this ?

We don't copy all the data from the other persona to the main persona.
That would be a "merge", not a "link". Instead we copy only the data
that folks uses for determining when two personas are linked. i.e. the
linkable attributes (local-id, im-address and webservice-addres), such
that folks now links/unlinks the two personas.

If there is no main persona, like if you're just linking two telepathy
personas together we have to create one so that we have somewhere to
write the linkable attributes. This persona will then be linked to both
of the telepathy personas.







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]