mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 22:42:18 +00:00
Custom fields now correctly are hidden/displayed when protected attribute is set
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
#import "MPCustomFieldTableViewDelegate.h"
|
||||
#import "MPCustomFieldTableCellView.h"
|
||||
#import "MPEntryInspectorViewController.h"
|
||||
|
||||
#import "HNHUi/HNHUi.h"
|
||||
#import "KeePassKit/KeePassKit.h"
|
||||
|
||||
@implementation MPCustomFieldTableViewDelegate
|
||||
@@ -44,6 +44,11 @@
|
||||
withKeyPath:@"objectValue.isProtected"
|
||||
options:nil];
|
||||
|
||||
[view.valueTextField bind:NSStringFromSelector(@selector(showPassword))
|
||||
toObject:view
|
||||
withKeyPath:@"objectValue.isProtected"
|
||||
options:@{NSValueTransformerNameBindingOption: NSNegateBooleanTransformerName}];
|
||||
|
||||
|
||||
for(NSControl *control in @[view.labelTextField, view.valueTextField, view.removeButton, view.protectedButton ]) {
|
||||
[control bind:NSEnabledBinding
|
||||
|
||||
Reference in New Issue
Block a user