From ce5fa1061ed87b9b944017e23ed531a40288a487 Mon Sep 17 00:00:00 2001 From: michael starke Date: Tue, 29 Sep 2015 12:44:44 +0200 Subject: [PATCH] fixed bug in autotype document search Signed-off-by: michael starke --- MacPass/MPAutotypeDaemon.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MacPass/MPAutotypeDaemon.m b/MacPass/MPAutotypeDaemon.m index 1b23c796..d8b88350 100644 --- a/MacPass/MPAutotypeDaemon.m +++ b/MacPass/MPAutotypeDaemon.m @@ -154,7 +154,7 @@ NSString *const kMPProcessIdentifierKey = @"kMPProcessIdentifierKey"; NSArray *documents = [NSApp orderedDocuments]; NSPredicate *filterPredicate = [NSPredicate predicateWithBlock:^BOOL(id _Nonnull evaluatedObject, NSDictionary * _Nullable bindings) { MPDocument *document = evaluatedObject; - return document.encrypted;}]; + return !document.encrypted;}]; NSArray *unlockedDocuments = [documents filteredArrayUsingPredicate:filterPredicate]; /* We look for all unlocked documents, if all open documents are locked, we pop the front most and try to search again */ if(unlockedDocuments.count == 0 && documents.count > 0) {