~exprez135/cryptomator-libre

f72035210c733cb683d4572ba942878f58da15e6 — Armin Schrenk 1 year, 6 months ago 89ef523
fixing error where vault stays in processing state if unlock is canceld via system close button (window decoration bar)
1 files changed, 7 insertions(+), 0 deletions(-)

M main/ui/src/main/java/org/cryptomator/ui/unlock/UnlockController.java
M main/ui/src/main/java/org/cryptomator/ui/unlock/UnlockController.java => main/ui/src/main/java/org/cryptomator/ui/unlock/UnlockController.java +7 -0
@@ 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()");