*/
public class Tpf.PersonaStore : Folks.PersonaStore
{
- private string[] _always_writeable_properties = { "is-favourite" };
+ private string[] _always_writeable_properties = {};
/* Sets of Personas exposed by this store.
* This is the roster + self_contact */
{
warning ("Failed to initialise favourite contacts: %s",
e.message);
+ this._logger = null;
}
});
var contacts = yield this._logger.get_favourite_contacts ();
this._favourite_contacts_changed_cb (contacts, {});
+
+ this._always_writeable_properties += "is-favourite";
+ this.notify_property ("always-writeable-properties");
}
private Persona? _lookup_persona_by_id (string id)
this._can_group_personas = MaybeBool.FALSE;
this._can_remove_personas = MaybeBool.FALSE;
- this._always_writeable_properties = { "is-favourite" };
+ if (this._logger != null)
+ {
+ this._always_writeable_properties = { "is-favourite" };
+ }
+ else
+ {
+ this._always_writeable_properties = {};
+ }
+
this.notify_property ("always-writeable-properties");
}
}
assert (tpf_persona != null);
assert ("alias" in tpf_persona.writeable_properties);
- assert ("is-favourite" in tpf_persona.writeable_properties);
+ /* The logger isn't run in the test suite. */
+ assert (!("is-favourite"
+ in tpf_persona.writeable_properties));
assert ("groups" in tpf_persona.writeable_properties);
/* These are only writeable for the user contact */
assert (tpf_persona.is_user);
}
assert (tpf_persona != null);
assert ("alias" in tpf_persona.writeable_properties);
- assert ("is-favourite" in tpf_persona.writeable_properties);
+ /* The logger isn't run in the test suite. */
+ assert (!("is-favourite"
+ in tpf_persona.writeable_properties));
assert ("groups" in tpf_persona.writeable_properties);
/* These are only writeable for the user contact */
assert (!tpf_persona.is_user);