From 44f148c7ea1bdf6da6ddc4e25bb8b79c4b2cee78 Mon Sep 17 00:00:00 2001 From: Bob Sun Date: Sun, 26 Feb 2017 21:12:17 +0800 Subject: [PATCH] Show cancel button by default for password (instead of showing cancel after three wrong attempts) --- pass/Models/PasswordStore.swift | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/pass/Models/PasswordStore.swift b/pass/Models/PasswordStore.swift index 53cbc99..cba6012 100644 --- a/pass/Models/PasswordStore.swift +++ b/pass/Models/PasswordStore.swift @@ -43,12 +43,10 @@ struct GitCredential { PasswordStore.shared.gitRepositoryPassword = newPassword sem.signal() })) - if Defaults[.gitRepositoryPasswordAttempts] == 3 { - alert.addAction(UIAlertAction(title: "Cancel", style: .cancel) { _ in - Defaults[.gitRepositoryPasswordAttempts] = -1 - sem.signal() - }) - } + alert.addAction(UIAlertAction(title: "Cancel", style: .cancel) { _ in + Defaults[.gitRepositoryPasswordAttempts] = -1 + sem.signal() + }) alert.addTextField(configurationHandler: {(textField: UITextField!) in textField.text = PasswordStore.shared.gitRepositoryPassword textField.isSecureTextEntry = true