diff --git a/ChangeLog b/ChangeLog index 6f7552233..d387299be 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2010-01-22 Francis Lachapelle + * UI/Contacts/UIxListEditor.m (-references): avoid printing the + email address between brackets if not defined. + * UI/Contacts/UIxListView.m (-itemHasEmail): new method that returns YES if the current list item has an email address. diff --git a/UI/Contacts/UIxListEditor.m b/UI/Contacts/UIxListEditor.m index 5e116ff94..2007b6515 100644 --- a/UI/Contacts/UIxListEditor.m +++ b/UI/Contacts/UIxListEditor.m @@ -79,8 +79,12 @@ { ref = [[list cardReferences] objectAtIndex: i]; row = [NSMutableDictionary dictionary]; - [row setObject: [NSString stringWithFormat: @"%@ <%@>", [ref fn], [ref email]] - forKey: @"name"]; + if ([[ref email] length] > 0) + [row setObject: [NSString stringWithFormat: @"%@ <%@>", [ref fn], [ref email]] + forKey: @"name"]; + else + [row setObject: [ref fn] + forKey: @"name"]; [row setObject: [ref reference] forKey: @"id"]; [rc addObject: row]; }