Improve thread handling

This commit is contained in:
Ralph Plawetzki
2024-11-24 14:11:01 +01:00
parent 2f1b5109d6
commit c8075dbc19

View File

@@ -1,6 +1,5 @@
package org.cryptomator.ui.vaultoptions;
import org.apache.commons.lang3.SystemUtils;
import org.cryptomator.common.Passphrase;
import org.cryptomator.common.keychain.KeychainManager;
import org.cryptomator.common.vaults.Vault;
@@ -64,7 +63,7 @@ public class MasterkeyOptionsController implements FxController {
* @param wasSet
* @param isSet <code>true</code>, when the checkbox is ticked, <code>false</code> otherwise
*/
private void needAuthenticatedUserCheckboxToggled(Observable observable, Boolean wasSet, Boolean isSet) {
public synchronized void needAuthenticatedUserCheckboxToggled(Observable observable, Boolean wasSet, Boolean isSet) {
try {
var vaultId = vault.getId();
if (keychain.isPassphraseStored(vaultId)) {