Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to provide entry data as Future<T> #222

Open
NejakejTomas opened this issue Sep 12, 2023 · 0 comments
Open

Ability to provide entry data as Future<T> #222

NejakejTomas opened this issue Sep 12, 2023 · 0 comments

Comments

@NejakejTomas
Copy link

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

@NejakejTomas NejakejTomas changed the title Ability to provide entries as Future<T> Ability to provide entry data as Future<T> Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant