mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-24 03:58:49 +03:00
Place repeatedPassword after first check & remove unnecessary empty check
This commit is contained in:
parent
95dc80ddec
commit
992468d6c1
1 changed files with 5 additions and 10 deletions
|
@ -2127,6 +2127,11 @@ UserSettingsModel::exportSessionKeys()
|
|||
if (!ok)
|
||||
return;
|
||||
|
||||
if (password.isEmpty()) {
|
||||
QMessageBox::warning(nullptr, tr("Error"), tr("The password cannot be empty"));
|
||||
return;
|
||||
}
|
||||
|
||||
auto repeatedPassword = QInputDialog::getText(nullptr,
|
||||
tr("Repeat File Password"),
|
||||
tr("Repeat the passphrase:"),
|
||||
|
@ -2136,16 +2141,6 @@ UserSettingsModel::exportSessionKeys()
|
|||
if (!ok)
|
||||
return;
|
||||
|
||||
if (password.isEmpty()) {
|
||||
QMessageBox::warning(nullptr, tr("Error"), tr("The password cannot be empty"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (repeatedPassword.isEmpty()) {
|
||||
QMessageBox::warning(nullptr, tr("Error"), tr("Please repeat the password"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (password != repeatedPassword) {
|
||||
QMessageBox::warning(nullptr, tr("Error"), tr("Passwords don't match"));
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue