From bc6f82fa7b986430a36e639dfcd86394e884b698 Mon Sep 17 00:00:00 2001 From: michael starke Date: Mon, 24 Apr 2017 11:11:48 +0200 Subject: [PATCH] removed obsolte code. Better display of trash context bar --- MacPass/MPContextBarViewController.m | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/MacPass/MPContextBarViewController.m b/MacPass/MPContextBarViewController.m index ead3e971..9cc81cc6 100644 --- a/MacPass/MPContextBarViewController.m +++ b/MacPass/MPContextBarViewController.m @@ -110,18 +110,14 @@ typedef NS_ENUM(NSUInteger, MPContextTab) { - (void)_showEntryHistory:(NSNotification *)notification { self.activeTab = MPContextTabHistory; - [self _updateBindings]; } - (void)_didChangeCurrentItem:(NSNotification *)notification { - MPDocument *document = [notification object]; - - KPKNode *node = document.selectedNodes.count == 1 ? document.selectedNodes.firstObject : nil; - - BOOL showTrash = document.tree.metaData.useTrash && (node.isTrashed || node.isTrash); + MPDocument *document = notification.object; + KPKGroup *group = document.selectedGroups.firstObject; + BOOL showTrash = document.tree.metaData.useTrash && group.isTrash; if(showTrash && ! document.hasSearch) { self.activeTab = MPContextTabTrash; - [self _updateBindings]; } } @@ -136,10 +132,6 @@ typedef NS_ENUM(NSUInteger, MPContextTab) { #pragma mark UI Helper -- (void)_updateBindings { - // only the entry view has to be bound, the rest not -} - - (void)_updateFilterButtons { MPDocument *document = [[self windowController] document]; MPEntrySearchFlags currentFlags = document.searchContext.searchFlags;