mirror of
https://github.com/MacPass/MacPass.git
synced 2026-02-02 02:48:23 +00:00
Minor codestyle updates
This commit is contained in:
@@ -852,16 +852,16 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGrou
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)duplicateEntryWithOptions:(KPKCopyOptions)options {
|
- (void)duplicateEntryWithOptions:(KPKCopyOptions)options {
|
||||||
KPKEntry *duplicate;
|
KPKEntry *lastDuplicate;
|
||||||
for(KPKEntry *entry in self.selectedEntries) {
|
for(KPKEntry *entry in self.selectedEntries) {
|
||||||
duplicate = [entry copyWithTitle:nil options:options];
|
lastDuplicate = [entry copyWithTitle:nil options:options];
|
||||||
[duplicate addToGroup:entry.parent];
|
[lastDuplicate addToGroup:entry.parent];
|
||||||
}
|
}
|
||||||
[self.undoManager setActionName:[NSString stringWithFormat:NSLocalizedString(@"DUPLICATE_ENTRIES_ACTION_NAME", @"Action name for duplicating entries"), self.selectedEntries.count]];
|
[self.undoManager setActionName:[NSString stringWithFormat:NSLocalizedString(@"DUPLICATE_ENTRIES_ACTION_NAME", @"Action name for duplicating entries"), self.selectedEntries.count]];
|
||||||
if(duplicate) {
|
if(lastDuplicate) {
|
||||||
[NSNotificationCenter.defaultCenter postNotificationName:MPDocumentDidAddEntryNotification
|
[NSNotificationCenter.defaultCenter postNotificationName:MPDocumentDidAddEntryNotification
|
||||||
object:self
|
object:self
|
||||||
userInfo:@{ MPDocumentEntryKey: duplicate }];
|
userInfo:@{ MPDocumentEntryKey: lastDuplicate }];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user