diff --git a/GitUpKit/Interface/GIImageDiffView.m b/GitUpKit/Interface/GIImageDiffView.m index 9ec2c87f..29723602 100644 --- a/GitUpKit/Interface/GIImageDiffView.m +++ b/GitUpKit/Interface/GIImageDiffView.m @@ -111,21 +111,17 @@ - (void)updateCurrentImage { if (![[NSFileManager defaultManager] fileExistsAtPath:newPath]) { [self.repository exportBlobWithSHA1:_delta.newFile.SHA1 toPath:newPath error:&error]; } - } else if (_delta.canonicalPath && _delta.oldFile.SHA1 == nil) { + } else { newPath = [self.repository absolutePathForFile:_delta.canonicalPath]; } - if (newPath) { - _currentImageSize = [self imageSizeWithoutLoadingFromPath:newPath]; - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - NSImage* limitedSizeImage = [self generateLimitedSizeImageFromPath:newPath]; - dispatch_async(dispatch_get_main_queue(), ^{ - _currentImageView.image = limitedSizeImage; - [self setNeedsDisplay:true]; - }); + _currentImageSize = [self imageSizeWithoutLoadingFromPath:newPath]; + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ + NSImage* limitedSizeImage = [self generateLimitedSizeImageFromPath:newPath]; + dispatch_async(dispatch_get_main_queue(), ^{ + _currentImageView.image = limitedSizeImage; + [self setNeedsDisplay:true]; }); - } else { - _currentImageView.image = nil; - } + }); } - (void)updateOldImage {