mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 20:02:27 +00:00
added equality for autotype context
This commit is contained in:
@@ -65,4 +65,6 @@
|
|||||||
- (instancetype)initWithDefaultSequenceForEntry:(KPKEntry *)entry;
|
- (instancetype)initWithDefaultSequenceForEntry:(KPKEntry *)entry;
|
||||||
- (instancetype)initWithWindowAssociation:(KPKWindowAssociation *)association;
|
- (instancetype)initWithWindowAssociation:(KPKWindowAssociation *)association;
|
||||||
|
|
||||||
|
- (BOOL)isEqualToAutotypeContext:(MPAutotypeContext *)context;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@@ -57,6 +57,19 @@
|
|||||||
return copy;
|
return copy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (BOOL)isEqual:(id)object {
|
||||||
|
return [self isEqualToAutotypeContext:object];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)isEqualToAutotypeContext:(MPAutotypeContext *)context {
|
||||||
|
if(![context isKindOfClass:self.class]) {
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
if(KPKComparsionDifferent == [self.entry compareToEntry:context.entry]) {
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
return [self.normalizedCommand isEqualToString:context.normalizedCommand];
|
||||||
|
}
|
||||||
|
|
||||||
- (BOOL)valid {
|
- (BOOL)valid {
|
||||||
return (self.normalizedCommand != nil);
|
return (self.normalizedCommand != nil);
|
||||||
|
|||||||
Reference in New Issue
Block a user