forked from Mirrors/elk
wip
This commit is contained in:
parent
9f1beaac05
commit
c391c75ceb
1 changed files with 13 additions and 4 deletions
|
@ -15,18 +15,27 @@ function removeFilteredItems(items: mastodon.v1.Status[], context: mastodon.v1.F
|
||||||
const isReblogFiltered = (item: mastodon.v1.Status) => !item.reblog?.filtered?.find(isStrict)
|
const isReblogFiltered = (item: mastodon.v1.Status) => !item.reblog?.filtered?.find(isStrict)
|
||||||
|
|
||||||
const homeFilter = useHomeFilter()
|
const homeFilter = useHomeFilter()
|
||||||
const { bot, mutual, repost, sensitive, tag } = homeFilter.value
|
const { bot, sensitive, repost, mutual, tag } = homeFilter.value
|
||||||
|
|
||||||
const isClientSideHomeFiltered = (item: mastodon.v1.Status) => {
|
const isClientSideHomeFiltered = (item: mastodon.v1.Status) => {
|
||||||
if (bot && mutual && repost && sensitive && tag)
|
if (bot && sensitive && repost && mutual && tag)
|
||||||
return true
|
return true
|
||||||
|
|
||||||
if (item.account.bot && !bot)
|
if (!bot && item.account.bot)
|
||||||
return false
|
return false
|
||||||
|
|
||||||
if (item.sensitive && !sensitive)
|
if (!sensitive && item.sensitive)
|
||||||
return false
|
return false
|
||||||
|
|
||||||
|
// if (!repost && ??)
|
||||||
|
// return false
|
||||||
|
|
||||||
|
// if (!mutual && ??)
|
||||||
|
// return false
|
||||||
|
|
||||||
|
// if (!tag && ??)
|
||||||
|
// return false
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue