Adium

Changeset 14824

Show
Ignore:
Timestamp:
01/08/2006 03:41:28 PM (3 years ago)
Author:
evands
Message:

Oops, the commit message for [14823] was supposed to go here. Fixed determination of which contact to show when doing a Get Info; this prevents a situation in which a metacontact would be selected for getting info when the metacontact was actually effectively hidden because it had no contained list objects which were on any online contact list. Fixes #1055

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Source/AIContactInfoWindowController.m

    r14431 r14824  
    8181        //Configure and show window 
    8282 
    83         //Find the highest-up metaContact so our info is accurate 
    84  
    85         AIListObject    *containingObject; 
    86         while ([(containingObject = [listObject containingObject]) isKindOfClass:[AIMetaContact class]]) { 
    87                 listObject = containingObject; 
     83        if ([listObject isKindOfClass:[AIListContact class]]) { 
     84                AIListContact *parentContact = [(AIListContact *)listObject parentContact]; 
     85                 
     86                /* Use the parent contact if it is a valid meta contact which contains contacts 
     87                 * If this contact is within a metacontact but not currently listed on any buddy list, we don't want to  
     88                 * display the effectively-invisible metacontact's info but rather the info of this contact itself. 
     89                 */ 
     90                if (![parentContact isKindOfClass:[AIMetaContact class]] || 
     91                        [[(AIMetaContact *)parentContact listContacts] count]) { 
     92                        listObject = parentContact; 
     93                } 
    8894        } 
    8995 
     
    442448                                                                   [(AIListContact *)displayedObject parentContact] : 
    443449                                                                   displayedObject); 
    444  
     450         
    445451        if ([listObject isKindOfClass:[AIMetaContact class]] && 
    446452                ([[(AIMetaContact *)listObject listContacts] count] > 1)) {