chore: simplify password unlocking via keyboard

Turns out it is not needed to check whether an action is enabled before
triggerin it: the trigger is automatically suppressed if the action is
not yet enabled.
master
Johan Ouwerkerk 2021-03-06 15:25:29 +01:00 committed by Bhushan Shah
parent d00111edc9
commit 8ddfdaba42
1 changed files with 1 additions and 5 deletions

View File

@ -59,11 +59,7 @@ Kirigami.ScrollablePage {
text: ""
Kirigami.FormData.label: i18nc("@label:textbox", "Password:")
enabled: !vm.busy
onAccepted: {
if (unlockAction.enabled) {
unlockAction.trigger()
}
}
onAccepted: unlockAction.trigger()
}
}
}