Fixed broken QR code parsing in TOTP wizzard

This commit is contained in:
Michael Starke
2022-05-24 16:12:59 +02:00
parent cbb4cea9cf
commit 360eb23692

View File

@@ -205,7 +205,7 @@ typedef NS_ENUM(NSUInteger, MPOTPType) {
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:{