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.
This commit is contained in:
Jonathan White 2022-03-10 16:13:13 -05:00
parent 1ae0d772c4
commit 4bc32d37ac

View File

@ -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();
}
}
}