Refresh data on "Back", allow configuration of View + border
[jvcard.git] / src / be / nikiroo / jvcard / Contact.java
index 08c2a515e563cdfb39aadc7ab84795b1ec1153c6..1b888961466737bace2f6f647ee5d9d21b2b739b 100644 (file)
@@ -47,13 +47,9 @@ public class Contact extends BaseClass<Data> {
                for (Data data : getData(name)) {
                        if (first == null)
                                first = data;
-                       for (int index = 0; index < data.size(); index++) {
-                               TypeInfo type = data.get(index);
-                               if (type.getName().equals("TYPE")
-                                               && type.getValue().equals("pref")) {
-                                       return data;
-                               }
-                       }
+
+                       if (data.isPreferred())
+                               return data;
                }
 
                return first;