From 1ed18568a997de67d53f23d283ef80493ad295bc Mon Sep 17 00:00:00 2001 From: Michael Starke Date: Mon, 27 Aug 2018 11:37:34 +0200 Subject: [PATCH] Hide protected attributes in dialog --- MacPass/MPPickfieldTableModel.m | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/MacPass/MPPickfieldTableModel.m b/MacPass/MPPickfieldTableModel.m index a4aef15b..582141d1 100644 --- a/MacPass/MPPickfieldTableModel.m +++ b/MacPass/MPPickfieldTableModel.m @@ -51,13 +51,12 @@ for(KPKAttribute *attribute in entry.defaultAttributes) { /* TODO exclude protected values */ - [items addObject:[MPPickfieldTableModelRowItem itemWithName:attribute.key value:attribute.value]]; + [items addObject:[MPPickfieldTableModelRowItem itemWithName:attribute.key value:(attribute.protect ? @"•••" : attribute.value)]]; } [items addObject:[MPPickfieldTableModelRowItem groupItemWithName:NSLocalizedString(@"ENTRY_CUSTOM_ATTRIBUTES", @"Group row for entry attributes")]]; for(KPKAttribute *attribute in entry.customAttributes) { - /* TODO exclude protected values */ - [items addObject:[MPPickfieldTableModelRowItem itemWithName:attribute.key value:attribute.value]]; + [items addObject:[MPPickfieldTableModelRowItem itemWithName:attribute.key value:(attribute.protect ? @"•••" : attribute.value)]]; } self.items = items; // copy creates an immutable copy }