[folks] telepathy: Fix notification of is-favourite changes
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] telepathy: Fix notification of is-favourite changes
- Date: Tue, 17 Apr 2012 11:17:33 +0000 (UTC)
commit 74bb1d2dc0f8e891cc3c90ddb5e4002ed4b7db2e
Author: Philip Withnall <philip tecnocode co uk>
Date: Mon Mar 26 16:21:56 2012 +0100
telepathy: Fix notification of is-favourite changes
This ensures that the UI reflects errors in changing the is-favourite status
of a Tpf.Persona, rather than just blindly assuming they succeed.
backends/telepathy/lib/tpf-persona.vala | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/backends/telepathy/lib/tpf-persona.vala b/backends/telepathy/lib/tpf-persona.vala
index eae6551..b8543af 100644
--- a/backends/telepathy/lib/tpf-persona.vala
+++ b/backends/telepathy/lib/tpf-persona.vala
@@ -338,12 +338,17 @@ public class Tpf.Persona : Folks.Persona,
is_favourite);
}
- this._is_favourite = is_favourite;
- this.notify_property ("is-favourite");
+ /* The change will be notified when we receive changes from the store. */
}
+ /* Note: Only ever called by Tpf.PersonaStore. */
internal void _set_is_favourite (bool is_favourite)
{
+ if (this._is_favourite == is_favourite)
+ {
+ return;
+ }
+
this._is_favourite = is_favourite;
this.notify_property ("is-favourite");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]