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

Fix Newly Compatible filter with repo autoupdate #2734

Merged
merged 1 commit into from
Apr 23, 2019

Conversation

HebaruSan
Copy link
Member

Problem

If you have repository auto updates enabled, then the Newly Compatible filter will show all modules:

screenshot

Cause

Before #2694, GUI performed two mod list updates at startup if repository auto updates were enabled: one with the existing registry data (which the user will never see), and one with the registry data after the repo update. This is not great because mod list updates are one of our slower operations.

After #2694, GUI performed only one mod list update at startup, using the data after the repo update. This improved performance, but it broke the Newly Compatible filter because that filter was based on a comparison of the mod list before and after the repo update. With only do one mod list update, the "before" list in the comparison is empty, and every mod seems to be newly added.

Changes

Now the "before" part of the before-and-after comparison is generated based on the registry before the repositories are updated, and then passed to the mod list updating code after the repo update. This allows us to populate the filter properly without performing multiple mod list updates.

Fixes #2716.

@HebaruSan HebaruSan added Bug Something is not working as intended GUI Issues affecting the interactive GUI Pull request labels Apr 18, 2019
@Olympic1 Olympic1 removed the Bug Something is not working as intended label Apr 18, 2019
@HebaruSan HebaruSan added the Bug Something is not working as intended label Apr 18, 2019
GUI/MainRepo.cs Show resolved Hide resolved
GUI/MainRepo.cs Show resolved Hide resolved
@HebaruSan HebaruSan merged commit f078f0d into KSP-CKAN:master Apr 23, 2019
@Olympic1 Olympic1 removed Bug Something is not working as intended Pull request labels Apr 23, 2019
@HebaruSan HebaruSan deleted the fix/newfilt-autoupdate branch April 23, 2019 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GUI Issues affecting the interactive GUI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Newly Compatible shows all mods, not just those newly compatible
3 participants