Closed JohnAFernandez closed 10 months ago
I was also trying to find a way to remove the Downloading <package>
lines when the download had succeeded, but I couldn't do that by only altering the .Axaml file. (I couldn't find a way to check for more than one boolean with a binding)
Also,I am not trying to make the number of tasks smaller at the top....
I was also trying to find a way to remove the
Downloading <package>
lines when the download had succeeded, but I couldn't do that by only altering the .Axaml file. (I couldn't find a way to check for more than one boolean with a binding)
You arent going to be able to hide from the axml, im sure that what would happen is that an empty space will be displayed instead of what you would want it to do. I dont know how to bind to multiple booleans, it might be possible but i never asked.
But you should be able to make it dissapear from code rather easily Here is were the download task is inserted into the list of tasks the current task has, (the task list works very similar to a tree data structure.) https://github.com/KnossosNET/Knossos.NET/blob/main/Knossos.NET/ViewModels/Templates/TaskItemViewModel.cs#L3206
The only thing you would need to do is to remove it from the list around line 3260 were we can be sure the file has been downloaded and the checksum is ok. await Dispatcher.UIThread.InvokeAsync(() => TaskList.Remove(filetask));
Always with a dispatcher when we are modifiyng a collection that is binded to the UI.
That should do it, altrought it will need some testing.
Also, this is only for mod installs/modify. If you want to do the same for builds you also need to do the same in the InstallBuild method.
I added the line and it seemed to work fine. I think I would only add it to the mod install and not build install as mod install is just much busier.
My testing seems to show that it works:
Btw, the last commit makes the "Complete!" text even with the progress bars. So that is intentionally different from the first set of screenshots.
Looks good to me, if this is done we can merge
Cyborg says that's it for this one, so I'll merge in a few minutes unless Shivan beats me to it :D
I noticed that the formatting and spacing in the download list were a little rough, so I made some changes.
Before:
After: