Using new KeePassKit API, simple multi selection support

This commit is contained in:
michael starke
2016-02-25 18:41:50 +01:00
parent 06c5f4d740
commit eb6e6bcaa9
22 changed files with 213 additions and 247 deletions

View File

@@ -116,7 +116,9 @@ typedef NS_ENUM(NSUInteger, MPContextTab) {
- (void)_didChangeCurrentItem:(NSNotification *)notification {
MPDocument *document = [notification object];
BOOL showTrash = document.tree.metaData.useTrash && (document.selectedItem.isTrashed || document.selectedItem.isTrash);
KPKNode *node = document.selectedNodes.count == 1 ? document.selectedNodes.firstObject : nil;
BOOL showTrash = document.tree.metaData.useTrash && (node.isTrashed || node.isTrash);
if(showTrash && ! document.hasSearch) {
self.activeTab = MPContextTabTrash;
[self _updateBindings];