Commit e7fe2e60 authored by Xavier Claessens's avatar Xavier Claessens
Browse files

Add internal TpfPersona._set_is_favourite

https://bugzilla.gnome.org/show_bug.cgi?id=630822
parent ac7413f7
......@@ -554,14 +554,14 @@ public class Tpf.PersonaStore : Folks.PersonaStore
this._favourite_ids.add (id);
Persona ?p = this._lookup_persona_by_id (id);
if (p != null)
p.is_favourite = true;
p._set_is_favourite (true);
}
foreach (var id in removed)
{
this._favourite_ids.remove (id);
Persona ?p = this._lookup_persona_by_id (id);
if (p != null)
p.is_favourite = false;
p._set_is_favourite (false);
}
}
......@@ -896,7 +896,8 @@ public class Tpf.PersonaStore : Folks.PersonaStore
this._contact_persona_map[contact] = persona;
contact.weak_ref (this._contact_weak_notify_cb);
persona.is_favourite = this._favourite_ids.contains (contact.get_identifier ());
var is_favourite = this._favourite_ids.contains (contact.get_identifier ());
persona._set_is_favourite (is_favourite);
return persona;
}
......
......@@ -343,6 +343,12 @@ public class Tpf.Persona : Folks.Persona,
this.notify_property ("is-favourite");
}
internal void _set_is_favourite (bool is_favourite)
{
this._is_favourite = is_favourite;
this.notify_property ("is-favourite");
}
private HashSet<EmailFieldDetails> _email_addresses =
new HashSet<EmailFieldDetails> (
(GLib.HashFunc) EmailFieldDetails.hash,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment