File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -104,16 +104,12 @@ - (void)awakeFromNib
104104 bottomColor: [NSColor colorWithCalibratedHue: 0.579 saturation: 0.119 brightness: 0.765 alpha: 1.000 ]];
105105 [self updateBranchFilterMatrix ];
106106
107- // listen for updates
108- [[NSNotificationCenter defaultCenter ] addObserver: self selector: @selector (_repositoryUpdatedNotification: ) name: PBGitRepositoryEventNotification object: repository];
109-
110- __weak PBGitHistoryController *weakSelf = self;
111- commitList.findPanelActionBlock = ^(id sender){
112- PBGitHistoryController *controller = weakSelf;
113- if (!controller) {
114- return ;
115- }
116- [controller.view.window makeFirstResponder: controller->searchField];
107+ // listen for updates
108+ [[NSNotificationCenter defaultCenter ] addObserver: self selector: @selector (_repositoryUpdatedNotification: ) name: PBGitRepositoryEventNotification object: repository];
109+
110+ __unsafe_unretained PBGitHistoryController *weakSelf = self;
111+ commitList.findPanelActionBlock = ^(id sender) {
112+ [weakSelf.view.window makeFirstResponder: weakSelf->searchField];
117113 };
118114
119115 [super awakeFromNib ];
You can’t perform that action at this time.
0 commit comments