diff options
author | Niels De Graef <nielsdegraef@gmail.com> | 2018-03-31 14:03:03 +0200 |
---|---|---|
committer | Niels De Graef <nielsdegraef@gmail.com> | 2018-03-31 14:03:03 +0200 |
commit | d4b67b62ab217d191b44bd13b53d98b65be81adf (patch) | |
tree | 1ad21aaaa378aa8ef82b2c3913899927f8915ae1 | |
parent | 0e2f79aba5d800511f1b25559c60aa09ab3c07f9 (diff) | |
download | gnome-contacts-d4b67b62ab217d191b44bd13b53d98b65be81adf.tar.gz |
Contact: cleanup _get_is_hidden().
* Don't hide the user itself (most of the times, this isn't even set
anyway).
* Remove tabs and unnecessary variables
-rw-r--r-- | src/contacts-contact.vala | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/contacts-contact.vala b/src/contacts-contact.vala index 22fd76d..8ac9481 100644 --- a/src/contacts-contact.vala +++ b/src/contacts-contact.vala @@ -53,16 +53,11 @@ public class Contacts.Contact : GLib.Object { private bool _is_hidden_to_delete; private bool _get_is_hidden () { - // Don't show the user itself - if (individual.is_user) - return true; - // Contact has been deleted (but this is not actually posted, for undo support) - if (_is_hidden_to_delete) + if (this._is_hidden_to_delete) return true; - var personas = individual.personas; - var i = personas.iterator(); + var i = this.individual.personas.iterator(); // Look for single-persona individuals if (i.next() && !i.has_next ()) { var persona = i.get(); @@ -71,13 +66,12 @@ public class Contacts.Contact : GLib.Object { // Filter out pure key-file persona individuals as these are // not very interesting if (store.type_id == "key-file") - return true; + return true; // Filter out uncertain things like link-local xmpp if (store.type_id == "telepathy" && - store.trust_level == PersonaStoreTrust.NONE) - return true; - + store.trust_level == PersonaStoreTrust.NONE) + return true; } return false; |