From 77143591c26d1b61fa56012336739c5311a90801 Mon Sep 17 00:00:00 2001 From: Michael Starke Date: Wed, 27 Mar 2019 09:27:46 +0100 Subject: [PATCH] Added notes for refactoring --- MacPass/MPDocument.h | 2 ++ MacPass/MPEntryViewController.m | 1 + 2 files changed, 3 insertions(+) diff --git a/MacPass/MPDocument.h b/MacPass/MPDocument.h index 03824982..ce09967d 100644 --- a/MacPass/MPDocument.h +++ b/MacPass/MPDocument.h @@ -92,6 +92,8 @@ FOUNDATION_EXPORT NSString *const MPDocumentGroupKey; /* Search - see MPDocument+Search for further details + + FIXME: Document is pinned to mode bases search. Wrong design! */ @property (nonatomic, readonly) BOOL hasSearch; @property (nonatomic, copy) MPEntrySearchContext *searchContext; diff --git a/MacPass/MPEntryViewController.m b/MacPass/MPEntryViewController.m index ed68a863..fd0f46ed 100644 --- a/MacPass/MPEntryViewController.m +++ b/MacPass/MPEntryViewController.m @@ -463,6 +463,7 @@ NSString *const _MPTableSecurCellView = @"PasswordCell"; - (void)_didAddItem:(NSNotification *)notification { MPDocument *document = notification.object; + // FIXME: UI should know search state not document! if(document.hasSearch) { return; // Search should not react to new Entries as it's displaying search results }