refactor(feed): comment out source filter in the feed

This commit is contained in:
en 2025-02-15 17:56:20 +01:00
parent db5b2d0a9c
commit 221b8b2050
2 changed files with 40 additions and 36 deletions

View File

@ -47,6 +47,8 @@ export const FeedFilter = React.memo(
</Dropdown> </Dropdown>
{/* source filter options */} {/* source filter options */}
{/* show only if not posts tabs */}
{tab !== 2 && (
<Dropdown <Dropdown
label={ label={
filterOptions.source === window.location.host filterOptions.source === window.location.host
@ -75,6 +77,7 @@ export const FeedFilter = React.memo(
Show All Show All
</Option> </Option>
</Dropdown> </Dropdown>
)}
{children} {children}
</Filter> </Filter>

View File

@ -68,15 +68,16 @@ export const FeedTabPosts = () => {
) )
// Filter source // Filter source
_notes = _notes.filter( // TODO: Enable source/client filter
(n) => // _notes = _notes.filter(
!( // (n) =>
filterOptions.source === window.location.host && // !(
n // filterOptions.source === window.location.host &&
.getMatchingTags('l') // n
.some((l) => l[1] === window.location.host && l[2] === 'source') // .getMatchingTags('l')
) // .some((l) => l[1] === window.location.host && l[2] === 'source')
) // )
// )
// Filter reply events // Filter reply events
_notes = _notes.filter((n) => n.getMatchingTags('e').length === 0) _notes = _notes.filter((n) => n.getMatchingTags('e').length === 0)
@ -85,7 +86,7 @@ export const FeedTabPosts = () => {
showing > 0 && _notes.splice(showing) showing > 0 && _notes.splice(showing)
return _notes return _notes
}, [filterOptions.nsfw, filterOptions.source, notes, showing]) }, [filterOptions.nsfw, notes, showing])
if (!userPubkey) return null if (!userPubkey) return null