[folks] Individual: don't always use the display_id.



commit 84b78da1fc769aa5abb8db1c52c8c9c6ae15a955
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Sun Jan 21 21:05:26 2018 +0100

    Individual: don't always use the display_id.
    
    Sometimes, a Persona's display_id will fall back to the IID, which
    we really don't want to show as a display name.
    
    Fixes bug 792567 (https://bugzilla.gnome.org/show_bug.cgi?id=792567).

 folks/individual.vala |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/folks/individual.vala b/folks/individual.vala
index beee267..8738bd3 100644
--- a/folks/individual.vala
+++ b/folks/individual.vala
@@ -1954,7 +1954,9 @@ public class Folks.Individual : Object,
 
   private string _look_up_display_id_for_display_name (Persona? p)
     {
-      if (p != null && p.display_id != null)
+      // Sometimes, the display_id will fall back to the IID.
+      // The last condition makes sure we don't use that as a display name
+      if (p != null && p.display_id != null && p.display_id != p.iid)
         {
           return p.display_id;
         }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]