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

Filter by installed #20

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

BlazyNights
Copy link

I was annoyed that I wasn't able to filter down to what mods I had installed, this change adds that functionality.

Changes:
Pages/Mods.xaml:

  • Installed header was changed to a checkbox, to try to stay consistent, I copied the values from the search header, although the margin was changed to allow the checkbox part to fit.
  • I didn't spend long on the front end, I just wanted the UI to show that there was an option for this and to show the state of it.

Pages/Mods.xaml.cs:

  • This uses ModsListView.Items.Filter, which is the same thing the text search uses, a lot of the code in this change is built around supporting the ability to use both filtering options at the same time.
  • FilteredToInstalled and FilteredBySearch are both simple state tracking bools, they're true whenever you're using one of the filters.
  • While SearchBar.Height == 0 was used in one spot, I tried to use the same logic again when the text search is called, but it doesn't seem to update fast enough and my breakpoints were never hit, which is the reason for FilteredBySearch now exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant