mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 17:32:17 +00:00
Removed unused class
This commit is contained in:
@@ -1,27 +0,0 @@
|
||||
//
|
||||
// MPEntryProxy.h
|
||||
// MacPass
|
||||
//
|
||||
// Created by Michael Starke on 07/03/16.
|
||||
// Copyright © 2016 HicknHack Software GmbH. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/*
|
||||
Proxies the display of an entry to enable discardable changes to the entry
|
||||
*/
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class KPKEntry;
|
||||
|
||||
@interface MPEntryProxy : NSProxy
|
||||
|
||||
@property (strong, readonly) KPKEntry *entry;
|
||||
|
||||
- (instancetype)initWithEntry:(KPKEntry *)entry;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,49 +0,0 @@
|
||||
//
|
||||
// MPEntryProxy.m
|
||||
// MacPass
|
||||
//
|
||||
// Created by Michael Starke on 07/03/16.
|
||||
// Copyright © 2016 HicknHack Software GmbH. All rights reserved.
|
||||
//
|
||||
|
||||
#import "MPEntryProxy.h"
|
||||
#import <KeePassKit/KeePassKit.h>
|
||||
|
||||
#pragma mark -
|
||||
|
||||
@interface MPEntryProxy ()
|
||||
|
||||
@property (strong) KPKEntry *entry;
|
||||
@property BOOL firstModification;
|
||||
|
||||
@end
|
||||
|
||||
@implementation MPEntryProxy
|
||||
- (instancetype)initWithEntry:(KPKEntry *)entry {
|
||||
if(!entry) {
|
||||
@throw [NSException exceptionWithName:NSInvalidArgumentException reason:nil userInfo:nil];
|
||||
}
|
||||
_entry = entry;
|
||||
_firstModification = NO;
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)forwardInvocation:(NSInvocation *)invocation {
|
||||
if(invocation.selector == @selector(touchModified)) {
|
||||
if(self.firstModification) {
|
||||
[self.entry pushHistory];
|
||||
self.firstModification = YES;
|
||||
}
|
||||
NSLog(@"Possible mutation detected. Creating backup!");
|
||||
}
|
||||
invocation.target = self.entry;
|
||||
[invocation invoke];
|
||||
}
|
||||
|
||||
- (NSMethodSignature *)methodSignatureForSelector:(SEL)sel {
|
||||
NSLog(@"methodSignatureForSelector %@", NSStringFromSelector(sel));
|
||||
return [self.entry methodSignatureForSelector:sel];
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user