Steam OTP display added.

This commit is contained in:
Michael Starke
2021-10-21 16:19:09 +02:00
parent 8b9c998ec7
commit 3cf0e5644e
3 changed files with 4 additions and 3 deletions

View File

@@ -73,7 +73,8 @@
BOOL showTOTP = entry.hasTimeOTP;
self.view.hidden = !showTOTP;
if(showTOTP) {
self.generator = [[KPKTimeOTPGenerator alloc] initWithAttributes:entry.attributes];
self.generator = entry.hasSteamOTP ? [[KPKSteamOTPGenerator alloc] initWithAttributes:entry.attributes] : [[KPKTimeOTPGenerator alloc] initWithAttributes:entry.attributes];
self.generator.time = NSDate.date.timeIntervalSince1970;
NSString *stringValue = self.generator.string;
self.toptValueTextField.stringValue = stringValue ? stringValue : @"";