From 4bc32d37ac5cce77f1bc23c4a5938dad8b208479 Mon Sep 17 00:00:00 2001 From: Jonathan White Date: Thu, 10 Mar 2022 16:13:13 -0500 Subject: [PATCH] Retain quick unlock if Hardware Key is missing * The hardware key missing error message is properly shown and the user can try to Quick Unlock again after plugging in or tapping the hardware key in time. --- src/gui/DatabaseOpenWidget.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/gui/DatabaseOpenWidget.cpp b/src/gui/DatabaseOpenWidget.cpp index 23719a3c1..bfa4af1f6 100644 --- a/src/gui/DatabaseOpenWidget.cpp +++ b/src/gui/DatabaseOpenWidget.cpp @@ -312,16 +312,14 @@ void DatabaseOpenWidget::openDatabase() setUserInteractionLock(false); - // Reset quick unlock for the current database - if (isOnQuickUnlockScreen()) { - resetQuickUnlock(); - } - m_retryUnlockWithEmptyPassword = false; m_ui->messageWidget->showMessage(error, MessageWidget::MessageType::Error); - // Focus on the password field and select the input for easy retry - m_ui->editPassword->selectAll(); - m_ui->editPassword->setFocus(); + + if (!isOnQuickUnlockScreen()) { + // Focus on the password field and select the input for easy retry + m_ui->editPassword->selectAll(); + m_ui->editPassword->setFocus(); + } } }