Added notes for refactoring

This commit is contained in:
Michael Starke
2019-03-27 09:27:46 +01:00
parent 515fd4be70
commit 77143591c2
2 changed files with 3 additions and 0 deletions

View File

@@ -92,6 +92,8 @@ FOUNDATION_EXPORT NSString *const MPDocumentGroupKey;
/* /*
Search - see MPDocument+Search for further details Search - see MPDocument+Search for further details
FIXME: Document is pinned to mode bases search. Wrong design!
*/ */
@property (nonatomic, readonly) BOOL hasSearch; @property (nonatomic, readonly) BOOL hasSearch;
@property (nonatomic, copy) MPEntrySearchContext *searchContext; @property (nonatomic, copy) MPEntrySearchContext *searchContext;

View File

@@ -463,6 +463,7 @@ NSString *const _MPTableSecurCellView = @"PasswordCell";
- (void)_didAddItem:(NSNotification *)notification { - (void)_didAddItem:(NSNotification *)notification {
MPDocument *document = notification.object; MPDocument *document = notification.object;
// FIXME: UI should know search state not document!
if(document.hasSearch) { if(document.hasSearch) {
return; // Search should not react to new Entries as it's displaying search results return; // Search should not react to new Entries as it's displaying search results
} }