adium 4206:a5515b4ca464: Patch by kbotc: "Undo 1fb2992a10d6 and ...

commits at adium.im commits at adium.im
Wed Sep 7 21:59:17 UTC 2011


details:	http://hg.adium.im/adium/rev/a5515b4ca464
revision:	4206:a5515b4ca464
branch:		(none)
author:		Robert Vehse
date:		Wed Sep 07 23:59:09 2011 +0200

Patch by kbotc: "Undo 1fb2992a10d6 and stll don't leak. Refs #14294."

diffs (45 lines):

diff -r 942e5c3f2018 -r a5515b4ca464 Frameworks/Adium Framework/Source/AIChat.m
--- a/Frameworks/Adium Framework/Source/AIChat.m	Thu Sep 08 00:55:39 2011 +0300
+++ b/Frameworks/Adium Framework/Source/AIChat.m	Wed Sep 07 23:59:09 2011 +0200
@@ -705,7 +705,7 @@
 		[adium.chatController chat:self removedListContact:contact];
 
 		if (contact.isStranger &&
-			([adium.chatController allGroupChatsContainingContact:contact.parentContact].count <= 1) &&
+			![adium.chatController allGroupChatsContainingContact:contact.parentContact].count &&
 			![adium.chatController existingChatWithContact:contact.parentContact]) {
 			
 			[[AIContactObserverManager sharedManager] delayListObjectNotifications];
@@ -728,7 +728,7 @@
 	for (AIListContact *listContact in self) {
 		if (listContact.isStranger &&
 			![adium.chatController existingChatWithContact:listContact.parentContact] &&
-			([adium.chatController allGroupChatsContainingContact:listContact.parentContact].count <= 1)) {
+			([adium.chatController allGroupChatsContainingContact:listContact.parentContact].count == 0)) {
 			[adium.contactController accountDidStopTrackingContact:listContact];
 		}
 	}
diff -r 942e5c3f2018 -r a5515b4ca464 Plugins/Purple Service/CBPurpleAccount.m
--- a/Plugins/Purple Service/CBPurpleAccount.m	Thu Sep 08 00:55:39 2011 +0300
+++ b/Plugins/Purple Service/CBPurpleAccount.m	Wed Sep 07 23:59:09 2011 +0200
@@ -787,7 +787,7 @@
 	[chat removeObject:contact];
 	
 	if (contact.isStranger && 
-		([adium.chatController allGroupChatsContainingContact:contact.parentContact].count <= 1) &&
+		![adium.chatController allGroupChatsContainingContact:contact.parentContact].count &&
 		[adium.chatController existingChatWithContact:contact.parentContact]) {
 		// The contact is a stranger, not in any more group chats, but we have a message with them open.
 		// Set their status to unknown.
diff -r 942e5c3f2018 -r a5515b4ca464 Source/AIChatController.m
--- a/Source/AIChatController.m	Thu Sep 08 00:55:39 2011 +0300
+++ b/Source/AIChatController.m	Wed Sep 07 23:59:09 2011 +0200
@@ -718,7 +718,7 @@
 	} else {
 		//Search for a chat with this AIListContact
 		for (AIChat *chat in openChats) {
-			if (chat.isGroupChat && [chat containsObject:inContact]) {
+			if (chat.isGroupChat && [chat containsObject:inContact] && chat.account.shouldBeOnline) {
 				[groupChats addObject:chat];
 			}
 		}




More information about the commits mailing list