Ability to provide entry data as Future<T>
NejakejTomas opened this issue ยท 0 comments
Currently there is no way to modify the screen once it it built. Even suppliers are run when build()
is called, not when they are needed (for example tooltip or dropdown selection).
Ability to dynamically modify items (like in #184) would be nice but I think for a lot of scenarios (like downloading list of minimap maps from web or calling any Kotlin suspend
function) accepting Future<T>
(for things like current value, default value, tooltip, etc.) would suffice and it shouldn't even be that difficult given current code. I tried to hack it for boolean entry as a proof of concept. It is in Kotlin and uses Deferred<T>
instead of Future<T>
, but conceptually it is the same. It works like this (current value has 2500ms delay and default value 5000ms):
2023-09-12.18-45-05.mp4
It would be nice to have something like this in Cloth Config (including tooltip but it would require me to extend more internal classes) because this uses internal classes and will probably break with next update