adium 2307:73666dadcbab: Fix removing a contact when groups are ...

commits at adium.im commits at adium.im
Sun May 24 14:39:18 UTC 2009


details:	http://hg.adium.im/adium/rev/73666dadcbab
revision:	2307:73666dadcbab
author:		Zachary West <zacw at adium.im>
date:		Sun May 24 10:38:54 2009 -0400

Fix removing a contact when groups are disables. Refs #12136.

When a list object is asked to remove itself from the root list, remove it from all its remote groups. Since we don't know where it belongs, we need to completely destroy it.

diffstat:

 Frameworks/Adium Framework/Source/AIListContact.m |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (19 lines):

diff -r e9d017a24193 -r 73666dadcbab Frameworks/Adium Framework/Source/AIListContact.m
--- a/Frameworks/Adium Framework/Source/AIListContact.m	Sun May 24 01:28:49 2009 -0700
+++ b/Frameworks/Adium Framework/Source/AIListContact.m	Sun May 24 10:38:54 2009 -0400
@@ -724,8 +724,13 @@
 - (void)removeFromGroup:(AIListObject <AIContainingObject> *)group
 {
 	if (self.account.online) {
-		[self.account removeContacts:[NSArray arrayWithObject:self]
-						  fromGroups:[NSArray arrayWithObject:group]];
+		if (group == adium.contactController.contactList) {
+			[self.account removeContacts:[NSArray arrayWithObject:self]
+							  fromGroups:[self.remoteGroups allObjects]];	
+		} else {			
+			[self.account removeContacts:[NSArray arrayWithObject:self]
+							  fromGroups:[NSArray arrayWithObject:group]];	
+		}
 	}
 }
 




More information about the commits mailing list