Fix "Sources::filter"

The "showNsfw" filter could only filter for either all sources or sources that aren't nsfw.
The "pinned" and "enabled" filtered behaved similarly, but at the same time they were also completely buggy.
E.g. "pinned = false" just returned all sources including pinned ones.
This commit is contained in:
schroda
2026-01-25 04:41:59 +01:00
parent bdb9a000f2
commit 2e08d2c95a
3 changed files with 9 additions and 12 deletions

View File

@@ -259,7 +259,7 @@ export const SearchAll: React.FC = () => {
const filteredSources = useMemo(
() =>
Sources.filter(sources, {
showNsfw,
isNsfw: showNsfw ? undefined : false,
languages: shownLangs,
keepLocalSource: true,
pinned: shouldShowOnlyPinnedSources,