fixing error where vault stays in processing state if unlock is canceld via system close button (window decoration bar)

This commit is contained in:
Armin Schrenk
2020-05-25 13:51:14 +02:00
parent 89ef5238ea
commit f72035210c

View File

@@ -74,6 +74,7 @@ public class UnlockController implements FxController {
this.unlockButtonContentDisplay = Bindings.createObjectBinding(this::getUnlockButtonContentDisplay, passwordEntryLock.awaitingInteraction());
this.userInteractionDisabled = passwordEntryLock.awaitingInteraction().not();
this.unlockButtonDisabled = new SimpleBooleanProperty();
this.window.setOnCloseRequest(windowEvent -> close());
}
@FXML
@@ -123,13 +124,19 @@ public class UnlockController implements FxController {
passwordEntryLock.awaitingInteraction().addListener(observable -> stopUnlockAnimation());
}
@FXML
public void cancel() {
LOG.debug("Unlock canceled by user.");
close();
}
private void close() {
window.close();
passwordEntryLock.interacted(UnlockModule.PasswordEntry.CANCELED);
}
@FXML
public void unlock() {
LOG.trace("UnlockController.unlock()");