-
Notifications
You must be signed in to change notification settings - Fork 0
Develop #9
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
Develop #9
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2280,6 +2280,15 @@ public IEnumerable<JobListing> FilterJobListings(JobListingFilter filter) | |||||||||||||||||||||||||||||||||||||||||
| query = query.Where(j => j.Skills != null && j.Skills.Any(s => s.Contains(skillTerm, StringComparison.OrdinalIgnoreCase))); | ||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| // Needs description filter | ||||||||||||||||||||||||||||||||||||||||||
| if (filter.NeedsDescription.HasValue) | ||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||
| if (filter.NeedsDescription.Value) | ||||||||||||||||||||||||||||||||||||||||||
| query = query.Where(j => string.IsNullOrWhiteSpace(j.Description)); | ||||||||||||||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||||||||||||||
| query = query.Where(j => !string.IsNullOrWhiteSpace(j.Description)); | ||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+2283
to
+2289
|
||||||||||||||||||||||||||||||||||||||||||
| // Needs description filter | |
| if (filter.NeedsDescription.HasValue) | |
| { | |
| if (filter.NeedsDescription.Value) | |
| query = query.Where(j => string.IsNullOrWhiteSpace(j.Description)); | |
| else | |
| query = query.Where(j => !string.IsNullOrWhiteSpace(j.Description)); | |
| const int MinimumDescriptionLength = 100; | |
| bool NeedsDescription(JobListing job) => | |
| string.IsNullOrWhiteSpace(job.Description) || | |
| job.Description.Trim().Length < MinimumDescriptionLength; | |
| // Needs description filter | |
| if (filter.NeedsDescription.HasValue) | |
| { | |
| if (filter.NeedsDescription.Value) | |
| query = query.Where(NeedsDescription); | |
| else | |
| query = query.Where(j => !NeedsDescription(j)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
selectedNeedsDescriptionis now part of the active filter state (filter.NeedsDescription), but it isn’t included in the filter preset save/restore logic (SaveCurrentAsPreset/OnPresetSelected). This means presets won’t persist the new Description filter selection. Consider extendingSavedFilterPresetand updating preset save/restore to include this field for consistent behavior with the other filter controls.