Fix bugs about getting next HOTP

- correctly increase the otpauth counter now
- fix bugs about re-initializing password
This commit is contained in:
Yishi Lin 2017-04-09 02:54:05 +08:00
parent c769c4126b
commit 4eba8f7800
2 changed files with 37 additions and 25 deletions

View file

@ -386,11 +386,8 @@ class PasswordDetailTableViewController: UITableViewController, UIGestureRecogni
return;
}
// increase HOTP counter
password!.increaseHotpCounter()
// copy HOTP to pasteboard
if let plainPassword = password!.getOtp() {
// copy HOTP to pasteboard (will update counter)
if let plainPassword = password!.getNextHotp() {
Utils.copyToPasteboard(textToCopy: plainPassword)
}