mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-07-23 16:42:56 +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:
co-authored by
Tobias Hagemann
parent
71a09eae67
commit
76949d6ccb
@@ -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