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.
This commit is contained in:
michael starke
2014-08-20 01:30:35 +02:00
parent 472289f7d7
commit 55d1644b17

View File

@@ -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: