[folks] Fix groups signal emissions in Tpf.Persona
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] Fix groups signal emissions in Tpf.Persona
- Date: Thu, 26 Aug 2010 21:20:09 +0000 (UTC)
commit 450e7f20e9df7167303c526786ab355eaf305463
Author: Philip Withnall <philip withnall collabora co uk>
Date: Wed Aug 25 16:54:10 2010 +0100
Fix groups signal emissions in Tpf.Persona
backends/telepathy/tpf-persona.vala | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/backends/telepathy/tpf-persona.vala b/backends/telepathy/tpf-persona.vala
index 603943b..c54085c 100644
--- a/backends/telepathy/tpf-persona.vala
+++ b/backends/telepathy/tpf-persona.vala
@@ -133,6 +133,11 @@ public class Tpf.Persona : Folks.Persona,
if (value.lookup (group) == false)
this._change_group (group, true);
});
+
+ /* Since we're only changing the members of this._groups, rather than
+ * replacing it with a new instance, we have to manually emit the
+ * notification. */
+ this.notify_property ("groups");
}
}
@@ -144,10 +149,7 @@ public class Tpf.Persona : Folks.Persona,
if (_change_group (group, is_member))
{
Tpf.PersonaStore store = (Tpf.PersonaStore) this.store;
-
yield store.change_group_membership (this, group, is_member);
-
- this.group_changed (group, is_member);
}
}
@@ -166,6 +168,9 @@ public class Tpf.Persona : Folks.Persona,
else
changed = this._groups.remove (group);
+ if (changed == true)
+ this.group_changed (group, is_member);
+
return changed;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]