fixed build warnings

This commit is contained in:
michael starke
2017-11-21 17:24:16 +01:00
parent 775dbd07ee
commit 287356d93e
6 changed files with 43 additions and 18 deletions

View File

@@ -42,9 +42,9 @@ NSString *const kMPDocumentSearchResultsKey = @"kMPDocumentSearchResul
- (void)enterSearchWithContext:(MPEntrySearchContext *)context {
/* the search context is loaded via defaults */
self.searchContext = context;
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateSearch:) name:NSUndoManagerDidRedoChangeNotification object:self.undoManager];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateSearch:) name:NSUndoManagerDidUndoChangeNotification object:self.undoManager];
[[NSNotificationCenter defaultCenter] postNotificationName:MPDocumentDidEnterSearchNotification object:self];
[NSNotificationCenter.defaultCenter addObserver:self selector:@selector(updateSearch:) name:NSUndoManagerDidRedoChangeNotification object:self.undoManager];
[NSNotificationCenter.defaultCenter addObserver:self selector:@selector(updateSearch:) name:NSUndoManagerDidUndoChangeNotification object:self.undoManager];
[NSNotificationCenter.defaultCenter postNotificationName:MPDocumentDidEnterSearchNotification object:self];
[self updateSearch:self];
}