File tree Expand file tree Collapse file tree 3 files changed +15
-7
lines changed Expand file tree Collapse file tree 3 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -318,11 +318,14 @@ - (void) updateProjectHistoryForRev:(PBGitRevSpecifier *)rev
318
318
lastRemoteRef = nil ;
319
319
lastOID = nil ;
320
320
self.commits = [NSMutableArray array ];
321
- [projectRevList loadRevisons ];
322
- return ;
321
+ [projectRevList loadRevisonsWithCompletionBlock: ^{
322
+ dispatch_async (dispatch_get_main_queue (), ^{
323
+ [self finishedGraphing ];
324
+ });
325
+ }];
326
+ } else {
327
+ [graphQueue addOperation: [self operationForCommits: projectRevList.commits]];
323
328
}
324
-
325
- [graphQueue addOperation: [self operationForCommits: projectRevList.commits]];
326
329
}
327
330
328
331
@@ -337,7 +340,11 @@ - (void) updateHistoryForRev:(PBGitRevSpecifier *)rev
337
340
lastOID = nil ;
338
341
self.commits = [NSMutableArray array ];
339
342
340
- [otherRevListParser loadRevisons ];
343
+ [otherRevListParser loadRevisonsWithCompletionBlock: ^{
344
+ dispatch_async (dispatch_get_main_queue (), ^{
345
+ [self finishedGraphing ];
346
+ });
347
+ }];
341
348
}
342
349
343
350
Original file line number Diff line number Diff line change 18
18
@property (nonatomic , strong ) NSMutableArray <PBGitCommit *> *commits;
19
19
20
20
- (id ) initWithRepository : (PBGitRepository *)repo rev : (PBGitRevSpecifier *)rev shouldGraph : (BOOL )graph ;
21
- - (void ) loadRevisons ;
21
+ - (void )loadRevisonsWithCompletionBlock : ( void (^)( void )) completionBlock ;
22
22
- (void )cancel ;
23
23
24
24
@end
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ - (id) initWithRepository:(PBGitRepository *)repo rev:(PBGitRevSpecifier *)rev s
62
62
return self;
63
63
}
64
64
65
- - (void ) loadRevisons
65
+ - (void )loadRevisonsWithCompletionBlock : ( void (^)( void )) completionBlock
66
66
{
67
67
[self cancel ];
68
68
@@ -83,6 +83,7 @@ - (void) loadRevisons
83
83
[weakSelf setupEnumerator: enu forRevspec: weakSelf.currentRev];
84
84
[weakSelf addCommitsFromEnumerator: enu inPBRepo: pbRepo operation: weakParseOperation];
85
85
}];
86
+ [parseOperation setCompletionBlock: completionBlock];
86
87
87
88
[self .operationQueue addOperation: parseOperation];
88
89
}
You can’t perform that action at this time.
0 commit comments