adium 3345:f43956cbc9fa: Fix the timeline not opening when new c...

commits at adium.im commits at adium.im
Wed Sep 29 04:02:43 UTC 2010


details:	http://hg.adium.im/adium/rev/f43956cbc9fa
revision:	3345:f43956cbc9fa
author:		Frank Dowsett <wixardy at adium.im>
date:		Tue Sep 28 23:41:31 2010 -0400

Fix the timeline not opening when new content arrives and only enable the stayInChat checkbox for bookmarks. Refs #12068

diffs (39 lines):

diff -r dc4039a09c76 -r f43956cbc9fa Source/AIAdvancedInspectorPane.m
--- a/Source/AIAdvancedInspectorPane.m	Tue Sep 28 18:06:11 2010 -0400
+++ b/Source/AIAdvancedInspectorPane.m	Tue Sep 28 23:41:31 2010 -0400
@@ -124,6 +124,7 @@
 	[checkBox_autoJoin setEnabled:[inObject isKindOfClass:[AIListBookmark class]]];
 	[checkBox_autoJoin setState:[[inObject preferenceForKey:KEY_AUTO_JOIN group:GROUP_LIST_BOOKMARK] boolValue]];
 
+	[checkBox_stayInChat setEnabled:[inObject isKindOfClass:[AIListBookmark class]]];
 	[checkBox_stayInChat setState:inObject.stayInChat];
 	
 	[popUp_accounts setEnabled:![inObject isKindOfClass:[AIListGroup class]]];
diff -r dc4039a09c76 -r f43956cbc9fa Source/AIContentController.m
--- a/Source/AIContentController.m	Tue Sep 28 18:06:11 2010 -0400
+++ b/Source/AIContentController.m	Tue Sep 28 23:41:31 2010 -0400
@@ -506,7 +506,11 @@
 						   (![inObject isOutgoing]));
 		shouldPostContentReceivedEvents = contentReceived && [inObject trackContent];
 		
-		if (![chat isOpen] && !chat.isGroupChat) {
+		AIListObject	*listObject = chat.listObject;
+		if(chat.isGroupChat)
+			listObject = (AIListObject *)[adium.contactController existingBookmarkForChat:chat];
+		
+		if (![chat isOpen] && (!chat.isGroupChat || !listObject.stayInChat)) {
 			/* Tell the interface to open the chat
 			 * For incoming messages, we don't open the chat until we're sure that new content is being received.
 			 * For group chats, we only open the chat for an unviewed mention. This is done in AIMentionEventPlugin.m.
@@ -523,11 +527,8 @@
 		
 		if (shouldPostContentReceivedEvents) {
 			NSSet			*previouslyPerformedActionIDs = nil;
-			AIListObject	*listObject = chat.listObject;
 			
 			if(chat.isGroupChat) {
-				listObject = (AIListObject *)[adium.contactController existingBookmarkForChat:chat];
-				
 				if ([inObject.displayClasses containsObject:@"mention"]) {
 					previouslyPerformedActionIDs = [adium.contactAlertsController generateEvent:CONTENT_GROUP_CHAT_MENTION
 																				  forListObject:listObject




More information about the commits mailing list