Skip to content

Commit 8c7cc90

Browse files
committed
Fix TOTP visibility on unlock and setting change
Also fix invalid key message being visible when adding new TOTP secret to an entry.
1 parent 217ee01 commit 8c7cc90

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/gui/EntryPreviewWidget.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ EntryPreviewWidget::EntryPreviewWidget(QWidget* parent)
9494
connect(config(), &Config::changed, this, [this](Config::ConfigKey key) {
9595
if (key == Config::GUI_HidePreviewPanel) {
9696
setVisible(!config()->get(Config::GUI_HidePreviewPanel).toBool());
97+
} else if (key == Config::Security_HideTotpPreviewPanel) {
98+
m_ui->entryTotpButton->setChecked(!config()->get(Config::Security_HideTotpPreviewPanel).toBool());
9799
}
98100
refresh();
99101
});
@@ -258,6 +260,7 @@ void EntryPreviewWidget::updateEntryTotp()
258260
m_totpTimer.start(1000);
259261
m_ui->entryTotpProgress->setMaximum(m_currentEntry->totpSettings()->step);
260262
updateTotpLabel();
263+
m_ui->entryTotp->setVisible(m_ui->entryTotpButton->isChecked());
261264
} else {
262265
m_ui->entryTotp->hide();
263266
m_ui->entryTotpButton->setChecked(false);

src/gui/TotpSetupDialog.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ void TotpSetupDialog::init()
108108
m_ui->algorithmComboBox->addItem(item.first, item.second);
109109
}
110110
m_ui->algorithmComboBox->setCurrentIndex(0);
111+
m_ui->invalidKeyLabel->setVisible(false);
111112

112113
// Read entry totp settings
113114
auto settings = m_entry->totpSettings();

0 commit comments

Comments
 (0)