Ticket #1046: ticket1046fix.patch
| File ticket1046fix.patch, 2.5 KB (added by Esteth, 19 months ago) |
|---|
-
Panels/JVDirectChatPanel.h
66 66 - (void) echoSentMessageToDisplay:(JVMutableChatMessage *) message; 67 67 - (JVMutableChatMessage *) currentMessage; 68 68 69 - (void) addMessageToHistory:(id)message; 70 69 71 - (void) performNotification:(NSString *) identifier withContextInfo:(NSDictionary *) context; 70 72 71 73 - (NSUInteger) newMessagesWaiting; -
Panels/JVDirectChatPanel.m
998 998 } 999 999 1000 1000 #pragma mark - 1001 #pragma mark History manipulation 1002 1003 - (void) addMessageToHistory:(id) message { 1004 if( ! [message length] ) return; 1005 if( [_sendHistory count] ) 1006 [_sendHistory replaceObjectAtIndex:0 withObject:[[[NSAttributedString alloc] initWithString:@""] autorelease]]; 1007 [_sendHistory insertObject:[[message copy] autorelease] atIndex:1]; 1008 if( [_sendHistory count] > [[[NSUserDefaults standardUserDefaults] objectForKey:@"JVChatMaximumHistory"] unsignedIntValue] ) 1009 [_sendHistory removeObjectAtIndex:[_sendHistory count] - 1]; 1010 } 1011 1012 #pragma mark - 1001 1013 #pragma mark Notifications Handling 1002 1014 1003 1015 /** … … 1066 1078 1067 1079 _historyIndex = 0; 1068 1080 if( ! [[send string] length] ) return; 1069 if( [_sendHistory count] ) 1070 [_sendHistory replaceObjectAtIndex:0 withObject:[[[NSAttributedString alloc] initWithString:@""] autorelease]]; 1071 [_sendHistory insertObject:[[[send textStorage] copy] autorelease] atIndex:1]; 1072 if( [_sendHistory count] > [[[NSUserDefaults standardUserDefaults] objectForKey:@"JVChatMaximumHistory"] unsignedIntValue] ) 1073 [_sendHistory removeObjectAtIndex:[_sendHistory count] - 1]; 1081 [self addMessageToHistory:[send textStorage]]; 1074 1082 1075 1083 if( [sender isKindOfClass:[NSNumber class]] && [sender boolValue] ) action = YES; 1076 1084 -
Plug-Ins/Standard
608 608 if( chatView && [msg length] ) { 609 609 JVMutableChatMessage *cmessage = [JVMutableChatMessage messageWithText:msg sender:[connection localUser]]; 610 610 [chatView sendMessage:cmessage]; 611 [chatView addMessageToHistory:msg]; 611 612 [chatView echoSentMessageToDisplay:cmessage]; 612 613 return YES; 613 614 } else if( ( user || room ) && [msg length] ) {
