adium/adium

Parents fceff51f0ad7
Children e30c939bb5dc
If the logArray is nil, then we're still indexing, so show "Loading...", if the logArray is an empty array, the user has not selected anything, so show nothing.

This should stop the text "Loading..." from flashing while indexing.
--- a/Source/AILogViewerWindowController.m Sat Feb 11 00:04:26 2012 +0100
+++ b/Source/AILogViewerWindowController.m Sat Feb 11 00:48:52 2012 +0100
@@ -709,10 +709,14 @@
{
[displayOperation cancel];
[displayOperation autorelease];
+ displayOperation = nil;
currentMatch = -1;
[self _displayLogText:[NSAttributedString stringWithString:@"Loading..."]];
- displayOperation = [[NSInvocationOperation alloc] initWithTarget:self selector:@selector(_displayLogs:) object:logArray];
- [[[self class] sharedLogViewerQueue] addOperation:displayOperation];
+
+ if (logArray) {
+ displayOperation = [[NSInvocationOperation alloc] initWithTarget:self selector:@selector(_displayLogs:) object:logArray];
+ [[[self class] sharedLogViewerQueue] addOperation:displayOperation];
+ }
}
//Displays the contents of the specified log in our window