Merge pull request #1676 from keepassxreboot/fix/reconnect_from_username_icon

Fix reconnecting from username icon
This commit is contained in:
Sami Vänttinen 2022-07-10 09:49:27 +03:00 committed by GitHub
commit cc868b9502
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -123,10 +123,14 @@ const iconClicked = async function(field, icon) {
return;
}
// Try to reconnect if KeePassXC is not currently connected
const connected = await sendMessage('is_connected');
if (!connected) {
kpxcUI.createNotification('error', tr('errorNotConnected'));
return;
const reconnectResponse = await sendMessage('reconnect');
if (!reconnectResponse.keePassXCAvailable) {
kpxcUI.createNotification('error', tr('errorNotConnected'));
return;
}
}
const databaseHash = await sendMessage('check_database_hash');