mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
CommitView: Remove checking if same file is displayed
This causes trouble if a file was partially staged, or if we switch from the staged changes to the unstaged changes. It should be quick enough not to matter anyway, so let's simplify things and remove the check.
This commit is contained in:
@@ -15,8 +15,6 @@
|
||||
IBOutlet NSArrayController *unstagedFilesController;
|
||||
IBOutlet NSArrayController *cachedFilesController;
|
||||
IBOutlet PBGitCommitController *controller;
|
||||
|
||||
id previousFile;
|
||||
}
|
||||
|
||||
- (void) showDiff:(PBChangedFile *)file cached:(BOOL)cached;
|
||||
|
||||
@@ -58,12 +58,6 @@ static PBChangedFile *lastFileSelected = nil;
|
||||
return;
|
||||
}
|
||||
|
||||
// Don't reload if we already display this file
|
||||
if (previousFile == file)
|
||||
return;
|
||||
|
||||
previousFile = file;
|
||||
|
||||
id script = [view windowScriptObject];
|
||||
NSLog(@"Showing diff..");
|
||||
[script callWebScriptMethod:@"showFileChanges" withArguments:[NSArray arrayWithObjects:file, [NSNumber numberWithBool:cached], nil]];
|
||||
|
||||
Reference in New Issue
Block a user