From 7ffcc0e43e03e44e7785ebcdf545702fbb5bf888 Mon Sep 17 00:00:00 2001 From: michael starke Date: Sat, 27 Jul 2013 22:24:19 +0200 Subject: [PATCH] Fixed #70 Empty keys for custom fields are handled correctly --- MacPass/Kdb4Entry+MPAdditions.m | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/MacPass/Kdb4Entry+MPAdditions.m b/MacPass/Kdb4Entry+MPAdditions.m index d42631ba..cfc696ce 100644 --- a/MacPass/Kdb4Entry+MPAdditions.m +++ b/MacPass/Kdb4Entry+MPAdditions.m @@ -11,9 +11,11 @@ @implementation Kdb4Entry (MPAdditions) - (NSString *)uniqueKeyForProposal:(NSString *)key { - /* - FIXME: Introduce some cachin behaviour. We iterate over after every single edit - */ + + if(key == nil) { + key = NSLocalizedString(@"DEFAULT_CUSTOM_FIELD_TITLE", @"Default Titel for new Custom-Fields"); + } + NSArray *defaultKeys = @[ FIELD_TITLE, FIELD_USER_NAME, FIELD_PASSWORD,