It now completely hides posts which have filters with warnings applied to them
This commit is contained in:
parent
c51f1be15c
commit
ea8a4ae487
|
@ -60,6 +60,8 @@ public class Status extends BaseModel implements DisplayItemsParent{
|
||||||
|
|
||||||
public transient boolean spoilerRevealed;
|
public transient boolean spoilerRevealed;
|
||||||
public transient boolean hasGapAfter;
|
public transient boolean hasGapAfter;
|
||||||
|
|
||||||
|
public transient boolean showFiltered = true;
|
||||||
private transient String strippedText;
|
private transient String strippedText;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -29,7 +29,7 @@ public class StatusFilterPredicate implements Predicate<Status>{
|
||||||
boolean matches=status.filtered.stream()
|
boolean matches=status.filtered.stream()
|
||||||
.map(filterResult->filterResult.filter)
|
.map(filterResult->filterResult.filter)
|
||||||
.filter(filter->filter.expiresAt==null||filter.expiresAt.isAfter(Instant.now()))
|
.filter(filter->filter.expiresAt==null||filter.expiresAt.isAfter(Instant.now()))
|
||||||
.anyMatch(filter->filter.filterAction==Filter.FilterAction.HIDE);
|
.anyMatch(filter->filter.filterAction==Filter.FilterAction.HIDE || filter.filterAction==Filter.FilterAction.WARN);
|
||||||
return !matches;
|
return !matches;
|
||||||
}
|
}
|
||||||
for(Filter filter:filters){
|
for(Filter filter:filters){
|
||||||
|
|
Loading…
Reference in New Issue