File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -53,8 +53,16 @@ - (void)setupSearch {
53
53
[NSNotificationCenter .defaultCenter addObserver: self selector: @selector (textDidChange: ) name: NSTextDidChangeNotification object: nil ];
54
54
}
55
55
56
+ - (void )resetSearch {
57
+ [self .searchTextField setStringValue: @" " ];
58
+ [self .repository updateFilePattern: nil ];
59
+ }
60
+
61
+ - (void )unsetSearch {
62
+ [NSNotificationCenter .defaultCenter removeObserver: self ];
63
+ }
64
+
56
65
- (void )textDidChange : (NSNotification *)notification {
57
- NSLog (@" NewValue: %@ " , self.searchTextField .stringValue );
58
66
NSString *text = self.searchTextField .stringValue ;
59
67
if ([@" " isEqualToString: text]) {
60
68
[self .repository updateFilePattern: nil ];
@@ -116,6 +124,15 @@ - (void)viewDidDisappear {
116
124
self.repository .statusMode = kGCLiveRepositoryStatusMode_Disabled ;
117
125
}
118
126
127
+ - (void )viewWillDisappear {
128
+ [super viewWillDisappear ];
129
+ [self resetSearch ];
130
+ }
131
+
132
+ - (void )dealloc {
133
+ [self unsetSearch ];
134
+ }
135
+
119
136
#pragma mark - Repository Handling
120
137
- (void )repositoryStatusDidUpdate {
121
138
[super repositoryStatusDidUpdate ];
You can’t perform that action at this time.
0 commit comments