mirror of
https://github.com/wgh136/pixes.git
synced 2025-09-27 04:57:23 +00:00
23 lines
548 B
Dart
23 lines
548 B
Dart
import 'package:pixes/appdata.dart';
|
|
import 'package:pixes/network/models.dart';
|
|
|
|
void checkIllusts(List<Illust> illusts) {
|
|
illusts.removeWhere((illust) {
|
|
if (illust.isBlocked) {
|
|
return true;
|
|
}
|
|
if (appdata.settings["blockTags"] == null) {
|
|
return false;
|
|
}
|
|
if (appdata.settings["blockTags"].contains(illust.author.name)) {
|
|
return true;
|
|
}
|
|
for (var tag in illust.tags) {
|
|
if ((appdata.settings["blockTags"] as List).contains(tag.name)) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
});
|
|
}
|