[folks] core: Fix get_extended_field() to check all Personas



commit 3ab1a7361eaa3c26f42188150fdff01e62d2987e
Author: Philip Withnall <philip withnall collabora co uk>
Date:   Tue Mar 17 14:07:51 2015 +0000

    core: Fix get_extended_field() to check all Personas
    
    Individual.get_extended_field() should check all Personas for the first
    non-null value before bailing out, rather than returning the property
    from the first Persona it finds, null or otherwise.

 folks/individual.vala |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/folks/individual.vala b/folks/individual.vala
index 0681e54..cdabc7f 100644
--- a/folks/individual.vala
+++ b/folks/individual.vala
@@ -1000,7 +1000,11 @@ public class Folks.Individual : Object,
           if ("extended-info" in p.writeable_properties)
             {
               var e = p as ExtendedInfo;
-              return e.get_extended_field (name);
+              var details = e.get_extended_field (name);
+              if (details != null)
+                {
+                  return details;
+                }
             }
         }
 


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