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 @@ -56,8 +56,16 @@ - (void)setupSearch {
56
56
[NSNotificationCenter .defaultCenter addObserver: self selector: @selector (textDidChange: ) name: NSTextDidChangeNotification object: nil ];
57
57
}
58
58
59
+ - (void )resetSearch {
60
+ [self .searchTextField setStringValue: @" " ];
61
+ [self .repository updateFilePattern: nil ];
62
+ }
63
+
64
+ - (void )unsetSearch {
65
+ [NSNotificationCenter .defaultCenter removeObserver: self ];
66
+ }
67
+
59
68
- (void )textDidChange : (NSNotification *)notification {
60
- NSLog (@" NewValue: %@ " , self.searchTextField .stringValue );
61
69
NSString *text = self.searchTextField .stringValue ;
62
70
if ([@" " isEqualToString: text]) {
63
71
[self .repository updateFilePattern: nil ];
@@ -123,6 +131,15 @@ - (void)viewDidDisappear {
123
131
self.repository .statusMode = kGCLiveRepositoryStatusMode_Disabled ;
124
132
}
125
133
134
+ - (void )viewWillDisappear {
135
+ [super viewWillDisappear ];
136
+ [self resetSearch ];
137
+ }
138
+
139
+ - (void )dealloc {
140
+ [self unsetSearch ];
141
+ }
142
+
126
143
#pragma mark - Repository Handling
127
144
- (void )repositoryStatusDidUpdate {
128
145
[super repositoryStatusDidUpdate ];
You can’t perform that action at this time.
0 commit comments