Skip to content

Commit a1a4196

Browse files
committed
Missing selectors
1 parent a43a1ef commit a1a4196

File tree

4 files changed

+17
-7
lines changed

4 files changed

+17
-7
lines changed

Classes/Controllers/PBWebController.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ - (void)closeView
6868
[[NSNotificationCenter defaultCenter] removeObserver:self];
6969
}
7070

71+
- (void)didLoad
72+
{
73+
}
74+
7175
# pragma mark Delegate methods
7276

7377
- (void)webView:(WebView *)sender didClearWindowObject:(WebScriptObject *)windowObject forFrame:(WebFrame *)frame

Classes/git/PBGitHistoryGrapher.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,22 @@
1515

1616
@class PBGitGrapher;
1717

18+
@protocol PBGitHistoryGrapherDelegate <NSObject>
19+
- (void)updateCommitsFromGrapher:(NSDictionary *)commitData;
20+
- (void)finishedGraphing;
21+
@end
22+
1823

1924
@interface PBGitHistoryGrapher : NSObject {
20-
__weak id delegate;
25+
__weak id <PBGitHistoryGrapherDelegate> delegate;
2126
NSOperationQueue *currentQueue;
2227

2328
NSMutableSet *searchOIDs;
2429
PBGitGrapher *grapher;
2530
BOOL viewAllBranches;
2631
}
2732

28-
- (id) initWithBaseCommits:(NSSet *)commits viewAllBranches:(BOOL)viewAll queue:(NSOperationQueue *)queue delegate:(id)theDelegate;
33+
- (instancetype) initWithBaseCommits:(NSSet *)commits viewAllBranches:(BOOL)viewAll queue:(NSOperationQueue *)queue delegate:(id <PBGitHistoryGrapherDelegate>)theDelegate;
2934
- (void) graphCommits:(NSArray *)revList;
3035

3136
@end

Classes/git/PBGitHistoryGrapher.m

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@
1313
@implementation PBGitHistoryGrapher
1414

1515

16-
- (id) initWithBaseCommits:(NSSet *)commits viewAllBranches:(BOOL)viewAll queue:(NSOperationQueue *)queue delegate:(id)theDelegate
16+
- (instancetype) initWithBaseCommits:(NSSet *)commits viewAllBranches:(BOOL)viewAll queue:(NSOperationQueue *)queue delegate:(id <PBGitHistoryGrapherDelegate>)theDelegate
1717
{
1818
self = [super init];
19+
if (!self) return nil;
1920

2021
delegate = theDelegate;
2122
currentQueue = queue;
@@ -29,9 +30,9 @@ - (id) initWithBaseCommits:(NSSet *)commits viewAllBranches:(BOOL)viewAll queue:
2930

3031
- (void)sendCommits:(NSArray *)commits
3132
{
32-
NSDictionary *commitData = [NSDictionary dictionaryWithObjectsAndKeys:currentQueue, kCurrentQueueKey, commits, kNewCommitsKey, nil];
33-
id strongDelegate = delegate;
34-
[strongDelegate performSelectorOnMainThread:@selector(updateCommitsFromGrapher:) withObject:commitData waitUntilDone:NO];
33+
dispatch_async(dispatch_get_main_queue(), ^{
34+
[self->delegate updateCommitsFromGrapher:@{ kCurrentQueueKey: self->currentQueue, kNewCommitsKey: commits }];
35+
});
3536
}
3637

3738

Classes/git/PBGitHistoryList.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#import "PBGitRef.h"
1515
#import "PBGitRevSpecifier.h"
1616

17-
@interface PBGitHistoryList ()
17+
@interface PBGitHistoryList () <PBGitHistoryGrapherDelegate>
1818

1919
- (void) resetGraphing;
2020

0 commit comments

Comments
 (0)