[gnome-contacts] Don't use FakePersona.maybe_create_for when not needed
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts] Don't use FakePersona.maybe_create_for when not needed
- Date: Wed, 14 Sep 2011 14:04:35 +0000 (UTC)
commit ec4f6663a5b20450dc3a58e132c390857ea433f1
Author: Alexander Larsson <alexl redhat com>
Date: Wed Sep 14 15:51:16 2011 +0200
Don't use FakePersona.maybe_create_for when not needed
We know there is no primary, so just create it
src/contacts-contact.vala | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/contacts-contact.vala b/src/contacts-contact.vala
index 24f8712..c90a82b 100644
--- a/src/contacts-contact.vala
+++ b/src/contacts-contact.vala
@@ -906,9 +906,8 @@ public class Contacts.Contact : GLib.Object {
// for single-persona sets
var persona_set = new HashSet<Persona>();
persona_set.add_all (individual.personas);
- var fake_persona = FakePersona.maybe_create_for (this);
- if (fake_persona != null)
- persona_set.add (fake_persona);
+ if (persona_set.size == 1)
+ persona_set.add (new FakePersona (this));
yield store.aggregator.link_personas (persona_set);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]