MinimizeAfterUnlock also when unlocking through browser

The MinimizeAfterUnlock setting added in #3439 closes the main window
after unlock. However, when the unlock is triggered through
KeePassXC-Browser, a password dialog is shown on top of the main window
and the main window remains open after the unlock. This is fixed
in this commit.
This commit is contained in:
Lukas Rytz 2021-03-24 17:02:49 +01:00 committed by Jonathan White
parent 8c61a73bb0
commit cc6f5c3226

View File

@ -1178,6 +1178,10 @@ void DatabaseWidget::unlockDatabase(bool accepted)
sshAgent()->databaseUnlocked(m_db);
#endif
if (config()->get(Config::MinimizeAfterUnlock).toBool()) {
getMainWindow()->minimizeOrHide();
}
if (senderDialog && senderDialog->intent() == DatabaseOpenDialog::Intent::AutoType) {
QList<QSharedPointer<Database>> dbList;
dbList.append(m_db);