diff --git a/src/pages/feed/FeedTabPosts.tsx b/src/pages/feed/FeedTabPosts.tsx index 58bd46f..869cb26 100644 --- a/src/pages/feed/FeedTabPosts.tsx +++ b/src/pages/feed/FeedTabPosts.tsx @@ -58,14 +58,18 @@ export const FeedTabPosts = () => { const filteredNotes = useMemo(() => { let _notes = notes || [] - // Filter nsfw (Hide_NSFW option) - _notes = _notes.filter( - (n) => - !( - filterOptions.nsfw === NSFWFilter.Hide_NSFW && - n.tagValue('L') === 'content-warning' - ) - ) + // NSFW Filter + _notes = _notes.filter((n) => { + if (filterOptions.nsfw === NSFWFilter.Only_NSFW) { + return n.getMatchingTags('L').some((l) => l[1] === 'content-warning') + } + + if (filterOptions.nsfw === NSFWFilter.Hide_NSFW) { + return !n.getMatchingTags('L').some((l) => l[1] === 'content-warning') + } + + return n + }) // Filter source // TODO: Enable source/client filter