Changeset 2557

Show
Ignore:
Timestamp:
04/20/05 18:04:09 (4 years ago)
Author:
timothy
Message:

Should prevent double rendering of messages and events in the chat area when first loading a room or private chat.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/JVStyleView.m

    r2555 r2557  
    260260 
    261261- (void) showTopic:(NSString *) topic { 
    262         if( ! topic ) { 
    263                 topic = @"<span style=\"color: grey\">(no chat topic is set)</span>"; 
    264         } 
     262        if( ! topic ) return; // don't show anything if there is no topic 
     263 
    265264        if( _webViewReady ) { 
    266265#ifdef WebKitVersion146 
     
    308307#endif 
    309308                if( topicShowing ) [self hideTopic]; 
    310                 else [self showTopic:topic]; 
     309                else [self showTopic:topic];  
    311310        } else { 
    312311                [self performSelector:_cmd withObject:topic afterDelay:0.];              
     
    317316 
    318317- (BOOL) appendChatMessage:(JVChatMessage *) message { 
    319         if( ! _webViewReady ) { 
    320                 [self performSelector:_cmd withObject:message afterDelay:0.]; 
    321                 return; 
    322         } 
     318        if( ! _webViewReady ) return; // don't schedule this to fire later since the transcript will be processed 
    323319 
    324320        NSString *result = nil; 
     
    351347 
    352348- (BOOL) appendChatTranscriptElement:(id <JVChatTranscriptElement>) element { 
    353         if( ! _webViewReady ) { 
    354                 [self performSelector:_cmd withObject:element afterDelay:0.]; 
    355                 return; 
    356         } 
     349        if( ! _webViewReady ) return; // don't schedule this to fire later since the transcript will be processed 
    357350 
    358351        NSString *result = nil;