Browse Source

always cancle unlock result when closing the unlock window

Armin Schrenk 1 year ago
parent
commit
de27bbf96e

+ 1 - 0
src/main/java/org/cryptomator/ui/keyloading/hub/HubKeyLoadingStrategy.java

@@ -44,6 +44,7 @@ public class HubKeyLoadingStrategy implements KeyLoadingStrategy {
 		this.window = window;
 		this.keychainManager = keychainManager;
 		window.setTitle(windowTitle);
+		window.setOnCloseRequest(_ -> result.cancel(true));
 		this.authFlowScene = authFlowScene;
 		this.noKeychainScene = noKeychainScene;
 		this.result = result;

+ 0 - 1
src/main/java/org/cryptomator/ui/keyloading/hub/RegisterDeviceController.java

@@ -193,7 +193,6 @@ public class RegisterDeviceController implements FxController {
 				}
 				registerException.set(cause);
 				window.setScene(registerFailedScene.get());
-				result.completeExceptionally(cause);
 			}
 		}
 	}