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 custom quick filter preselect validation #941

Merged
merged 1 commit into from May 12, 2024

Conversation

OothecaPickle
Copy link
Contributor

No description provided.

@theotherp
Copy link
Owner

Thanks for the MR. Are you sure this is correct? The format is filterName=value and with your change we would search the list of names for the value.

@OothecaPickle
Copy link
Contributor Author

OothecaPickle commented May 12, 2024

@theotherp Yes, I did a test build and it fixed the issue I was having (wherein a custom quickfilter I defined could not be preselected). Running this build, I was able to add custom quickfilters to preselect and they were automatically removed from preselect (as intended) when deleted.
Before this, defining a quickfilter, saving settings, adding a quickfilter to preselect, and saving settings again would result in the quickfilter being immediately removed from preselect, logged as "Custom quickfilter custom|filtername doesn't exist anymore, removing it from list of filters to preselect."

preselectQuickFilterButton is in the format "custom|[filtername]" and the line:
final String[] split = preselectQuickFilterButton.split("\\|");
splits it into "custom" (split[0]) and "[filtername]" (split[1]).

Therefore !customQuickfilterNames.contains(split[0])) checks customQuickfilterNames for the word "custom", not the actual name of the custom quickfilter (split[1]).

@theotherp
Copy link
Owner

Dang, should've tested this before I released a new version. Sorry, will be contained in the next one.

And congratulations on being the first contributor, I think, who makes a java change ;-)

@theotherp theotherp merged commit 5869174 into theotherp:master May 12, 2024
1 check passed
theotherp added a commit that referenced this pull request May 12, 2024
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.

None yet

2 participants