diff options
author | Erick Pérez Castellanos <erick.red@gmail.com> | 2014-09-15 01:41:43 -0400 |
---|---|---|
committer | Erick Pérez Castellanos <erick.red@gmail.com> | 2014-09-16 13:09:12 -0400 |
commit | d87cd20382fbfe2577659eb76c03f4599a82e6dd (patch) | |
tree | d2433cbfb95fa62771cf4559aa18fe5d9f5d550d | |
parent | cd9008007fda4b93e1844681c75a98e330294ce9 (diff) | |
download | gnome-contacts-d87cd20382fbfe2577659eb76c03f4599a82e6dd.tar.gz |
Contact: Find FakePersona for uid
Fix bug for adding details to contacts with its primary-persona not
belonging to the default addressbook
-rw-r--r-- | src/contacts-contact.vala | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/contacts-contact.vala b/src/contacts-contact.vala index d89718b..b3c14da 100644 --- a/src/contacts-contact.vala +++ b/src/contacts-contact.vala @@ -130,6 +130,8 @@ public class Contacts.Contact : GLib.Object { uint changed_id; bool changed_personas; + public Persona? fake_persona = null; + private Gdk.Pixbuf? _small_avatar; public Gdk.Pixbuf small_avatar { get { @@ -1124,6 +1126,9 @@ public class Contacts.Contact : GLib.Object { if (p.uid == uid) return p; } + if (uid == "uid-fake-persona" && this.fake_persona != null) + return this.fake_persona; + return null; } @@ -1527,10 +1532,11 @@ public class Contacts.FakePersona : Persona { public FakePersona (Contact contact) { Object (display_id: "display_id", - uid: "uid", + uid: "uid-fake-persona", iid: "iid", store: contact.store.aggregator.primary_store ?? FakePersonaStore.the_store(), is_user: false); this.contact = contact; + this.contact.fake_persona = this; } } |