-
Notifications
You must be signed in to change notification settings - Fork 54
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
Introduced override filters while searching setting #242
Conversation
9cc4aee
to
a57b46b
Compare
|
||
const setSettingValue = (key: keyof ISearchSettings, value: boolean) => { | ||
requestUpdateServerMetadata(metadata ?? {}, [[key, value]]).catch(() => | ||
makeToast('Failed to save the default reader settings to the server', 'warning'), |
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.
you forgot to update the error message (still says reader settings)
<ListItemIcon> | ||
<SearchIcon /> | ||
</ListItemIcon> | ||
<ListItemText primary="Override Filters when Searching" /> |
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.
what do you think about something like "Ignore filters while searching"? I feel like that is easier to understand then "Override"
src/util/searchSettings.ts
Outdated
overrideFilters: false, | ||
} as ISearchSettings); | ||
|
||
const getReaderSettingsWithDefaultValueFallback = ( |
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.
same as for the error message, name inlcudes "ReaderSettings"
@@ -53,12 +54,12 @@ const filterManga = ( | |||
query: NullAndUndefined<string>, | |||
unread: NullAndUndefined<boolean>, | |||
downloaded: NullAndUndefined<boolean>, | |||
overrideFilters: boolean, |
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.
I think "ignoreFilters" would be better fitting over all.
"overrideFilters" sounds to me like the filters will get replaced with different ones, while they are just ignored if the flag is set to true
src/typings.ts
Outdated
@@ -81,7 +81,7 @@ export interface IMetadataHolder<VALUES extends AllowedMetadataValueTypes = stri | |||
|
|||
export type AllowedMetadataValueTypes = string | boolean | number | undefined; | |||
|
|||
export type MangaMetadataKeys = keyof IReaderSettings; | |||
export type MangaMetadataKeys = keyof (IReaderSettings & ISearchSettings); |
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.
AppMetadataKeys should be a better place to add the type, since the search settings aren't really part of the mangas
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.
LGTM
What
This PR introduces a new setting called
Ignre Filters while Searching
. This setting as it says determines whether manga search will respect the filters that are set such as Downloaded, Unread, etc.Why
This will resolve a previous issue that some users had with the search behaviour which resulted in #226. This PR completely ignores the filters while searching. This PR is middle ground to keep most users satisfied with the Web UI behaviour