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

Update GUI modlist if scan detects changes #2762

Merged
merged 1 commit into from
May 14, 2019

Conversation

HebaruSan
Copy link
Member

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

  • Now KSP.ScanGameData returns a boolean, true if changed and false if same
  • Now we call ScanGameData from the repo update's background worker, with a status message describing its function
  • Now the background worker reports RepoUpdateResult.Updated if the scan found changes but the repos were the same, which will cause a mod list update

Fixes #2761.

@HebaruSan HebaruSan added Bug GUI Issues affecting the interactive GUI Core (ckan.dll) Issues affecting the core part of CKAN Pull request labels May 14, 2019
@Olympic1 Olympic1 removed the Bug label May 14, 2019
@HebaruSan HebaruSan added the Bug label May 14, 2019
@HebaruSan HebaruSan force-pushed the fix/refresh-on-scan-changed branch from bd17c1e to f6afe59 Compare May 14, 2019 19:33
@DasSkelett
Copy link
Member

Ha, was just about to ask thy you made RegisterDll() a bool ;)

@HebaruSan
Copy link
Member Author

Early draft, forgot to un-add from the commit. :)

Copy link
Member

@DasSkelett DasSkelett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, and after checking out the right branch before building, it even works 🤦‍♂.
At least for mods, can't test the DLCs.

@HebaruSan HebaruSan merged commit f6afe59 into KSP-CKAN:master May 14, 2019
@HebaruSan HebaruSan deleted the fix/refresh-on-scan-changed branch May 14, 2019 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core (ckan.dll) Issues affecting the core part of CKAN GUI Issues affecting the interactive GUI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Modlist dosen't update if new AD mods are detected
3 participants