-
Notifications
You must be signed in to change notification settings - Fork 8
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
Icons (various improvements part 2) #11
Conversation
arthomnix
commented
Jun 17, 2022
- Show icons next to the name and description
- Disable the button for the currently selected tab to give a visual indication that it is selected
- Update Fabric Loader and API again
build failed because gradle couldn't find minotaur? |
this.icon = new Identifier(VTDMod.MOD_ID, this.name.toLowerCase()); | ||
|
||
if (MinecraftClient.getInstance().getTextureManager().getOrDefault(icon, null) == null) { | ||
Thread iconDownloadThread = new Thread(() -> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opening a thread for each icon doesn't sound very efficient. It'd probably be better to have one or two threads downlading every icon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried downloading on one thread and it's very slow to load the icons compared to each icon having its own thread, it's probably better to leave it like this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It still doesn't convince me to open so many threads. Besides, not every icon is visible as soon as you open a tab, so downloading could be done once the user can see the entry. Instead of opening a lot of threads and never using them again, you could use a thread pool?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactored to use a thread pool, let me know if you would prefer a different type of thread pool
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!