mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-19 03:01:27 +00:00
Update src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyRecoverController.java
Co-authored-by: Tobias Hagemann <tobias.hagemann@skymatic.de>
This commit is contained in:
@@ -140,19 +140,17 @@ public class RecoveryKeyRecoverController implements FxController {
|
||||
}
|
||||
}
|
||||
|
||||
/* Getter/Setter */
|
||||
|
||||
public void validateRecoveryKey() {
|
||||
var valid = recoveryKeyFactory.validateRecoveryKey(recoveryKey.get(), unverifiedVaultConfig != null ? this::checkKeyAgainstVaultConfig : null);
|
||||
if (valid) {
|
||||
recoveryKeyState.set(RecoveryKeyState.CORRECT);
|
||||
} else {
|
||||
if (recoveryKeyState.getValue() != RecoveryKeyState.WRONG) { //set via side effect in checkKeyAgainstVaultConfig
|
||||
recoveryKeyState.set(RecoveryKeyState.INVALID);
|
||||
}
|
||||
} else if (recoveryKeyState.getValue() != RecoveryKeyState.WRONG) { // set via side effect in checkKeyAgainstVaultConfig()
|
||||
recoveryKeyState.set(RecoveryKeyState.INVALID);
|
||||
}
|
||||
}
|
||||
|
||||
/* Getter/Setter */
|
||||
|
||||
public Vault getVault() {
|
||||
return vault;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user