mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-23 06:49:32 +00:00
restore history entries added
This commit is contained in:
@@ -22,17 +22,22 @@ NSString *const MPDocumentHideEntryHistoryNotification = @"MPDocumentHideEntryH
|
||||
if(self.hasSearch) {
|
||||
[self exitSearch:sender];
|
||||
}
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:MPDocumentShowEntryHistoryNotification
|
||||
object:self
|
||||
userInfo:@{ MPDocumentEntryKey: entries.firstObject }];
|
||||
self.historyEntry = entries.firstObject;
|
||||
if(self.historyEntry) {
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:MPDocumentShowEntryHistoryNotification
|
||||
object:self
|
||||
userInfo:@{ MPDocumentEntryKey: self.historyEntry }];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)hideEntryHistory:(id)sender {
|
||||
self.historyEntry = nil;
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:MPDocumentHideEntryHistoryNotification
|
||||
object:self];
|
||||
}
|
||||
|
||||
- (void)revertEntry:(KPKEntry *)entry toEntry:(KPKEntry *)historyEntry {
|
||||
[entry pushHistory];
|
||||
[entry revertToEntry:historyEntry];
|
||||
[self.undoManager setActionName:NSLocalizedString(@"RESTORE_HISTORY_ENTRY", "Action to restore and Entry to a previous state of it's history")];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user