Skip to content

Commit

Permalink
Merge branch 'fix-totp-wizzard-issues'
Browse files Browse the repository at this point in the history
  • Loading branch information
mstarke committed Oct 6, 2022
2 parents 05a5d38 + 57433b8 commit a162c19
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion MacPass/MPTOTPSetupViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ - (IBAction)cancel:(id)sender {
- (IBAction)save:(id)sender {
// Update entry settings!
// FIXME: add model observing to ensure correct history recording
[self.view.window makeFirstResponder:nil];
[self.generator saveToEntry:self.representedEntry];
[self.presentingViewController dismissViewController:self];
}
Expand Down Expand Up @@ -205,7 +206,7 @@ - (void)_updateView:(MPOTPUpdateSource)source {
case MPOTPUpdateSourceQRImage: {
NSString *qrCodeString = self.qrCodeImageView.image.QRCodeString;
NSURL *otpURL = [NSURL URLWithString:qrCodeString];
self.generator = otpURL.isSteamOTPURL ? [[KPKSteamOTPGenerator alloc] initWithURL:self.urlTextField.stringValue] : [[KPKTimeOTPGenerator alloc] initWithURL:self.urlTextField.stringValue];
self.generator = otpURL.isSteamOTPURL ? [[KPKSteamOTPGenerator alloc] initWithURL:qrCodeString] : [[KPKTimeOTPGenerator alloc] initWithURL:qrCodeString];
break;
}
case MPOTPUpdateSourceURL:{
Expand Down

0 comments on commit a162c19

Please sign in to comment.