Backed out changeset 791780625051
authorZachary West <zacw@adium.im>
Fri Nov 06 12:37:12 2009 -0500 (2009-11-06)
changeset 28758983d9241c62
parent 2874 0b6d5e90a118
child 2876 3694834e5ed0
Backed out changeset 791780625051

This is causing regressions in a few other locations. Backing out for the next beta to investigate after. Refs #13221.
Source/AIContactController.m
     1.1 --- a/Source/AIContactController.m	Fri Nov 06 10:37:58 2009 -0500
     1.2 +++ b/Source/AIContactController.m	Fri Nov 06 12:37:12 2009 -0500
     1.3 @@ -255,7 +255,6 @@
     1.4  			}
     1.5  			
     1.6  			[bookmarkDict setObject:bookmark forKey:bookmark.internalObjectID];
     1.7 -			[contactDict setObject:bookmark forKey:bookmark.internalObjectID];
     1.8  			
     1.9  			//It's a newly created object, so set its initial attributes
    1.10  			[contactPropertiesObserverManager _updateAllAttributesOfObject:bookmark];
    1.11 @@ -379,6 +378,11 @@
    1.12  	for (AIListContact *contact in [self contactEnumerator]) {
    1.13  		[contact restoreGrouping];
    1.14  	}
    1.15 +	
    1.16 +	//Restore the grouping of all list bookmarks
    1.17 +	for (AIListBookmark *bookmark in [self allBookmarks]) {
    1.18 +		[bookmark restoreGrouping];
    1.19 +	}
    1.20  
    1.21  	//Stop delaying object notifications; this will automatically resort the contact list, so we're done.
    1.22  	[contactPropertiesObserverManager endListObjectNotificationsDelay];
    1.23 @@ -998,7 +1002,7 @@
    1.24  /*!
    1.25   * @brief Returns a flat array of all contacts
    1.26   *
    1.27 - * This does not include metacontacts or bookmarks.
    1.28 + * This does not include metacontacts
    1.29   */
    1.30  - (NSArray *)allContacts
    1.31  {
    1.32 @@ -1006,7 +1010,7 @@
    1.33  
    1.34  	for (AIListContact *contact in self.contactEnumerator) {
    1.35  		/* We want only contacts, not metacontacts. For a given contact, -[contact parentContact] could be used to access the meta. */
    1.36 -		if (![contact conformsToProtocol:@protocol(AIContainingObject)] || [contact isKindOfClass:[AIListBookmark class]])
    1.37 +		if (![contact conformsToProtocol:@protocol(AIContainingObject)])
    1.38  			[result addObject:contact];
    1.39  	}
    1.40  	
    1.41 @@ -1259,7 +1263,6 @@
    1.42  {
    1.43  	[self moveContact:listBookmark fromGroups:listBookmark.groups intoGroups:[NSSet set]];
    1.44  	[bookmarkDict removeObjectForKey:listBookmark.internalObjectID];
    1.45 -	[contactDict removeObjectForKey:listBookmark.internalObjectID];
    1.46  	
    1.47  	[self saveContactList];
    1.48  }