From d4b67b62ab217d191b44bd13b53d98b65be81adf Mon Sep 17 00:00:00 2001 From: Niels De Graef Date: Sat, 31 Mar 2018 14:03:03 +0200 Subject: 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 --- src/contacts-contact.vala | 16 +++++----------- 1 file 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; -- cgit v1.2.1