Adium

Changeset 23891

Show
Ignore:
Timestamp:
06/09/2008 07:26:22 PM (6 months ago)
Author:
evands
Message:

Don't create spurious AIChat objects just to note that typing has stopped.

  • Fixes a memory inefficiency introduced by fixing the Psychic functionality
  • Fixed resurrection of chats after they close by virtue of their typing status being reset at close. Fixes #9996
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Plugins/Purple Service/adiumPurpleSignals.m

    r23857 r23891  
    277277                return; 
    278278        } 
    279          
    280         AIChat *chat = [[[AIObject sharedAdiumInstance] chatController] chatWithContact:contact]; 
    281  
    282         [account typingUpdateForIMChat:chat typing:[NSNumber numberWithInt:typingState]]; 
     279 
     280        AIChat *chat; 
     281        switch (typingState) { 
     282                case AINotTyping: 
     283                        chat = [[[AIObject sharedAdiumInstance] chatController] existingChatWithContact:contact]; 
     284                        break; 
     285                case AITyping: 
     286                case AIEnteredText: 
     287                        chat = [[[AIObject sharedAdiumInstance] chatController] chatWithContact:contact]; 
     288                        AILogWithSignature(@"Made a chat for %s: %i", name, typingState); 
     289                        break; 
     290        } 
     291 
     292        if (chat) 
     293                [account typingUpdateForIMChat:chat typing:[NSNumber numberWithInt:typingState]]; 
    283294} 
    284295