mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 12:52:21 +00:00
fixed bug in autotype document search
Signed-off-by: michael starke <michael.starke@hicknhack-software.com>
This commit is contained in:
@@ -154,7 +154,7 @@ NSString *const kMPProcessIdentifierKey = @"kMPProcessIdentifierKey";
|
|||||||
NSArray *documents = [NSApp orderedDocuments];
|
NSArray *documents = [NSApp orderedDocuments];
|
||||||
NSPredicate *filterPredicate = [NSPredicate predicateWithBlock:^BOOL(id _Nonnull evaluatedObject, NSDictionary<NSString *,id> * _Nullable bindings) {
|
NSPredicate *filterPredicate = [NSPredicate predicateWithBlock:^BOOL(id _Nonnull evaluatedObject, NSDictionary<NSString *,id> * _Nullable bindings) {
|
||||||
MPDocument *document = evaluatedObject;
|
MPDocument *document = evaluatedObject;
|
||||||
return document.encrypted;}];
|
return !document.encrypted;}];
|
||||||
NSArray *unlockedDocuments = [documents filteredArrayUsingPredicate:filterPredicate];
|
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 */
|
/* 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) {
|
if(unlockedDocuments.count == 0 && documents.count > 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user