From 55d1644b17ee955dbb0aa38a797d9996915c8845 Mon Sep 17 00:00:00 2001 From: michael starke Date: Wed, 20 Aug 2014 01:30:35 +0200 Subject: [PATCH] Fixed not empty trash action If there were only groups or entries in the trash, the empty action was always disabled. It only worked when groups and entries were inside the trash. --- MacPass/MPDocument.m | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/MacPass/MPDocument.m b/MacPass/MPDocument.m index 1cca672a..b2ac3a6f 100644 --- a/MacPass/MPDocument.m +++ b/MacPass/MPDocument.m @@ -617,8 +617,7 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGroupKey valid &= self.selectedEntry == self.selectedItem; break; case MPActionEmptyTrash: - valid &= [self.trash.groups count] > 0; - valid &= [self.trash.entries count] > 0; + valid &= ([self.trash.groups count] + [self.trash.entries count]) > 0; break; case MPActionDatabaseSettings: case MPActionEditPassword: