adium-1.3 417:98f0ad534ec3: Fix a situation where contacts would...

commits at adium.im commits at adium.im
Mon Jun 28 12:41:04 UTC 2010


details:	http://hg.adium.im/adium-1.3/rev/98f0ad534ec3
revision:	417:98f0ad534ec3
author:		Robert Vehse
date:		Mon Jun 28 14:39:43 2010 +0200

Fix a situation where contacts would have a blank alias when their AB card nickname is left blank. Patch by Rigdern reviewed by sphynx. Thanks, folks!

diffs (14 lines):

diff -r e9281ab71872 -r 98f0ad534ec3 Source/ESAddressBookIntegrationPlugin.m
--- a/Source/ESAddressBookIntegrationPlugin.m	Thu Mar 11 20:28:51 2010 -0500
+++ b/Source/ESAddressBookIntegrationPlugin.m	Mon Jun 28 14:39:43 2010 +0200
@@ -437,7 +437,9 @@
 	if (useMiddleName && middleName)
 		firstName = [NSString stringWithFormat:@"%@ %@", firstName, middleName];
 
-	if (useNickName && (nickName = [person valueForProperty:kABNicknameProperty])) {
+	if (useNickName &&
+		(nickName = [person valueForProperty:kABNicknameProperty]) &&
+		![nickName isEqualToString:@""]) {
 		displayName = nickName;
 
 	} else if (!lastName || (thisDisplayFormat == First)) {  




More information about the commits mailing list