mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-13 21:42:32 +00:00
Fixes a bug resutling in a reappering password change promt when the database is already lock (fixes #696)
This commit is contained in:
@@ -342,7 +342,10 @@ typedef void (^MPPasswordChangedBlock)(BOOL didChangePassword);
|
||||
}
|
||||
|
||||
- (IBAction)lock:(id)sender {
|
||||
MPDocument *document = [self document];
|
||||
MPDocument *document = self.document;
|
||||
if(document.encrypted) {
|
||||
return; // Document already locked
|
||||
}
|
||||
if(!document.compositeKey) {
|
||||
[self editPasswordWithCompetionHandler:^(NSInteger result) {
|
||||
if(result == NSModalResponseOK) {
|
||||
@@ -351,9 +354,6 @@ typedef void (^MPPasswordChangedBlock)(BOOL didChangePassword);
|
||||
}];
|
||||
return;
|
||||
}
|
||||
if(document.encrypted) {
|
||||
return; // Document already locked
|
||||
}
|
||||
[document lockDatabase:sender];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user