Update GUI modlist if scan detects changes #2762
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.
Problem
If you install a DLL manually while GUI is running, clicking Refresh will not mark that mod as AD.
Cause
As of #2682, we avoid refreshing the mod list if the repos have not changed.
The DLC/DLL scanning functions are fire-and-forget; they don't tell us whether their data has changed. So either we refresh everything every time, or we miss scan changes. Currently it's the latter.
Changes
KSP.ScanGameData
returns a boolean, true if changed and false if sameScanGameData
from the repo update's background worker, with a status message describing its functionRepoUpdateResult.Updated
if the scan found changes but the repos were the same, which will cause a mod list updateFixes #2761.