Per-file progress for uninstall and upgrade #4193
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
As of #4055, progress bar updates during installation are more granular and reflective of the actual progress of unpacking mods, but removal and upgrades still treat each mod as a single unit and all mods as the same size, which makes the progress bar nearly useless.
Changes
Now for removal, we treat each file to remove as a unit of work, and mods with more files take up more progress bar space.
Now for upgrading, the removal part is treated as above and the installation part is treated as in #4055. The proportion of the progress bar devoted to removal vs installation is weighted by the number of mods in each group, so for most upgrades we will switch from removal to installation at the 50% mark, and the installation piece will expand when we're pulling in new dependencies.