diff options
author | isxander <xander@isxander.dev> | 2023-11-18 09:43:58 +0000 |
---|---|---|
committer | isxander <xander@isxander.dev> | 2023-11-18 09:43:58 +0000 |
commit | 4cdfa58b27d790786cbb2f17aa8f4635ea9d5a2d (patch) | |
tree | c29d86d94fd08cfabea052ab52e2e87ee7d3f030 | |
parent | 442f48a6e28196910e92f460d3d677e3e47cbfc0 (diff) | |
download | YetAnotherConfigLib-4cdfa58b27d790786cbb2f17aa8f4635ea9d5a2d.tar.gz YetAnotherConfigLib-4cdfa58b27d790786cbb2f17aa8f4635ea9d5a2d.tar.bz2 YetAnotherConfigLib-4cdfa58b27d790786cbb2f17aa8f4635ea9d5a2d.zip |
Set the pending value before creating the controller
-rw-r--r-- | common/src/main/java/dev/isxander/yacl3/impl/OptionImpl.java | 5 | ||||
-rw-r--r-- | gradle/wrapper/gradle-wrapper.properties | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/common/src/main/java/dev/isxander/yacl3/impl/OptionImpl.java b/common/src/main/java/dev/isxander/yacl3/impl/OptionImpl.java index 37a626b..e539f73 100644 --- a/common/src/main/java/dev/isxander/yacl3/impl/OptionImpl.java +++ b/common/src/main/java/dev/isxander/yacl3/impl/OptionImpl.java @@ -45,11 +45,12 @@ public final class OptionImpl<T> implements Option<T> { this.available = available; this.flags = flags; this.listeners = new ArrayList<>(listeners); + + this.pendingValue = binding.getValue(); this.controller = controlGetter.apply(this); addListener((opt, pending) -> description = descriptionFunction.apply(pending)); - - requestSet(binding().getValue()); + triggerListeners(true); } @Override diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 9ec0ca6..f48a8c4 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Sun Apr 23 19:05:18 BST 2023 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists |