mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-04-24 16:40:58 -04:00
Prefs fix
This commit is contained in:
@@ -119,7 +119,7 @@ public class AppPrefs {
|
||||
// ====
|
||||
|
||||
private final Property<SecretValue> lockPassword = new SimpleObjectProperty<SecretValue>();
|
||||
private final StringProperty lockCrypt = typed(new SimpleStringProperty(null), String.class);
|
||||
private final StringProperty lockCrypt = typed(new SimpleStringProperty(""), String.class);
|
||||
private final StringField lockCryptControl = StringField.ofStringType(lockCrypt).render(() -> new SimpleControl<StringField, StackPane>() {
|
||||
|
||||
private Region button;
|
||||
|
||||
@@ -2,6 +2,7 @@ package io.xpipe.app.prefs;
|
||||
|
||||
import com.dlsc.preferencesfx.util.StorageHandler;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.node.NullNode;
|
||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||
import com.fasterxml.jackson.databind.node.TextNode;
|
||||
import com.fasterxml.jackson.databind.type.CollectionType;
|
||||
@@ -50,7 +51,7 @@ public class JsonStorageHandler implements StorageHandler {
|
||||
var id = getSaveId(breadcrumb);
|
||||
var tree = object instanceof PrefsChoiceValue prefsChoiceValue
|
||||
? new TextNode(prefsChoiceValue.getId())
|
||||
: JacksonMapper.newMapper().valueToTree(object);
|
||||
: (object != null ? JacksonMapper.newMapper().valueToTree(object) : NullNode.getInstance());
|
||||
setContent(id, tree);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user