mirror of
https://github.com/wgh136/pixes.git
synced 2025-09-27 12:57:24 +00:00
block tags and authors
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import 'package:pixes/appdata.dart';
|
||||
import 'package:pixes/network/models.dart';
|
||||
|
||||
void checkIllusts(List<Illust> illusts) {
|
||||
List<Illust> checkIllusts(List<Illust> illusts) {
|
||||
illusts.removeWhere((illust) {
|
||||
if (illust.isBlocked) {
|
||||
return true;
|
||||
@@ -9,7 +9,7 @@ void checkIllusts(List<Illust> illusts) {
|
||||
if (appdata.settings["blockTags"] == null) {
|
||||
return false;
|
||||
}
|
||||
if (appdata.settings["blockTags"].contains(illust.author.name)) {
|
||||
if (appdata.settings["blockTags"].contains("user:${illust.author.name}")) {
|
||||
return true;
|
||||
}
|
||||
for (var tag in illust.tags) {
|
||||
@@ -19,4 +19,5 @@ void checkIllusts(List<Illust> illusts) {
|
||||
}
|
||||
return false;
|
||||
});
|
||||
return illusts;
|
||||
}
|
||||
|
Reference in New Issue
Block a user