Fixed compiler warnings and typos

This commit is contained in:
Michael Starke
2021-09-23 22:23:38 +02:00
parent b478b47d3d
commit 5652abfb1e
5 changed files with 11 additions and 9 deletions

View File

@@ -717,14 +717,14 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGrou
}
KPKGroup *newGroup = [self.tree createGroup:parent];
/* setting properties on entries is undoable, but we do not want to record this so disable on creation */
BOOL wasUndoEnabeld = self.undoManager.isUndoRegistrationEnabled;
KPK_SCOPED_DISABLE_UNDO_BEGIN(self.undoManager);
[self.undoManager disableUndoRegistration];
newGroup.title = NSLocalizedString(@"DEFAULT_GROUP_NAME", @"Title for a newly created group");
newGroup.iconId = MPIconFolder;
/* re-enable undo/redo if we did turn it off */
if(wasUndoEnabeld) {
[self.undoManager enableUndoRegistration];
}
KPK_SCOPED_DISABLE_UNDO_END;
[newGroup addToGroup:parent];
[newGroup.undoManager setActionName:NSLocalizedString(@"NEW_GROUP", "Action name for a newly created group")];
[NSNotificationCenter.defaultCenter postNotificationName:MPDocumentDidAddGroupNotification

View File

@@ -49,7 +49,7 @@ NSString *const MPExpiryDateValueTransformerName = @"com.hicknhack.macpass.MPExp
static NSDateFormatter *formatter;
if(!formatter) {
formatter = [[NSDateFormatter alloc] init];
formatter.dateStyle = kCFDateFormatterLongStyle;
formatter.dateStyle = NSDateFormatterLongStyle;
formatter.timeStyle = NSDateFormatterNoStyle;
}