mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 11:42:30 +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 {
|
- (IBAction)lock:(id)sender {
|
||||||
MPDocument *document = [self document];
|
MPDocument *document = self.document;
|
||||||
|
if(document.encrypted) {
|
||||||
|
return; // Document already locked
|
||||||
|
}
|
||||||
if(!document.compositeKey) {
|
if(!document.compositeKey) {
|
||||||
[self editPasswordWithCompetionHandler:^(NSInteger result) {
|
[self editPasswordWithCompetionHandler:^(NSInteger result) {
|
||||||
if(result == NSModalResponseOK) {
|
if(result == NSModalResponseOK) {
|
||||||
@@ -351,9 +354,6 @@ typedef void (^MPPasswordChangedBlock)(BOOL didChangePassword);
|
|||||||
}];
|
}];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(document.encrypted) {
|
|
||||||
return; // Document already locked
|
|
||||||
}
|
|
||||||
[document lockDatabase:sender];
|
[document lockDatabase:sender];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user