refactor(feed): comment out source filter in the feed
This commit is contained in:
parent
db5b2d0a9c
commit
221b8b2050
@ -47,6 +47,8 @@ export const FeedFilter = React.memo(
|
||||
</Dropdown>
|
||||
|
||||
{/* source filter options */}
|
||||
{/* show only if not posts tabs */}
|
||||
{tab !== 2 && (
|
||||
<Dropdown
|
||||
label={
|
||||
filterOptions.source === window.location.host
|
||||
@ -75,6 +77,7 @@ export const FeedFilter = React.memo(
|
||||
Show All
|
||||
</Option>
|
||||
</Dropdown>
|
||||
)}
|
||||
|
||||
{children}
|
||||
</Filter>
|
||||
|
@ -68,15 +68,16 @@ export const FeedTabPosts = () => {
|
||||
)
|
||||
|
||||
// Filter source
|
||||
_notes = _notes.filter(
|
||||
(n) =>
|
||||
!(
|
||||
filterOptions.source === window.location.host &&
|
||||
n
|
||||
.getMatchingTags('l')
|
||||
.some((l) => l[1] === window.location.host && l[2] === 'source')
|
||||
)
|
||||
)
|
||||
// TODO: Enable source/client filter
|
||||
// _notes = _notes.filter(
|
||||
// (n) =>
|
||||
// !(
|
||||
// filterOptions.source === window.location.host &&
|
||||
// n
|
||||
// .getMatchingTags('l')
|
||||
// .some((l) => l[1] === window.location.host && l[2] === 'source')
|
||||
// )
|
||||
// )
|
||||
|
||||
// Filter reply events
|
||||
_notes = _notes.filter((n) => n.getMatchingTags('e').length === 0)
|
||||
@ -85,7 +86,7 @@ export const FeedTabPosts = () => {
|
||||
|
||||
showing > 0 && _notes.splice(showing)
|
||||
return _notes
|
||||
}, [filterOptions.nsfw, filterOptions.source, notes, showing])
|
||||
}, [filterOptions.nsfw, notes, showing])
|
||||
|
||||
if (!userPubkey) return null
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user