main: fix wallet lock is unlocked without password

This commit is contained in:
selsta 2019-12-20 02:20:12 +01:00
parent 500c7ec82e
commit c5785ed195
No known key found for this signature in database
GPG key ID: 2EA0A99A8B07AE5E

View file

@ -2044,6 +2044,7 @@ ApplicationWindow {
if(rootItem.state !== "normal") return; if(rootItem.state !== "normal") return;
if(!persistentSettings.lockOnUserInActivity) return; if(!persistentSettings.lockOnUserInActivity) return;
if(passwordDialog.visible) return; if(passwordDialog.visible) return;
var inputDialogVisible = inputDialog && inputDialog.visible
// prompt password after X seconds of inactivity // prompt password after X seconds of inactivity
var epoch = Math.floor((new Date).getTime() / 1000); var epoch = Math.floor((new Date).getTime() / 1000);
@ -2056,9 +2057,11 @@ ApplicationWindow {
} else { } else {
passwordDialog.showError(qsTr("Wrong password")); passwordDialog.showError(qsTr("Wrong password"));
} }
if (inputDialogVisible) inputDialog.open(inputDialog.inputText)
} }
passwordDialog.onRejectedCallback = function() { appWindow.showWizard(); } passwordDialog.onRejectedCallback = function() { appWindow.showWizard(); }
if (inputDialogVisible) inputDialog.close()
passwordDialog.open(); passwordDialog.open();
} }