mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-24 02:49:45 +00:00
Removed duplicate paste commands for autotype
This commit is contained in:
@@ -151,8 +151,14 @@
|
||||
|
||||
+ (void)appendPasteCommandForContent:(NSString *)pasteContent toCommands:(NSMutableArray *)commands {
|
||||
if(pasteContent) {
|
||||
MPAutotypePaste *pasteCommand = [[MPAutotypePaste alloc] initWithString:pasteContent];
|
||||
[commands addObject:pasteCommand];
|
||||
/* Update an already inserted paste command with the new conents */
|
||||
if([[commands lastObject] isKindOfClass:[MPAutotypePaste class]]) {
|
||||
[[commands lastObject] appendString:pasteContent];
|
||||
}
|
||||
else {
|
||||
MPAutotypePaste *pasteCommand = [[MPAutotypePaste alloc] initWithString:pasteContent];
|
||||
[commands addObject:pasteCommand];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user