mirror of
https://github.com/wgh136/pixes.git
synced 2025-09-27 04:57:23 +00:00
show pages, ai, r18, r18g
This commit is contained in:
@@ -142,6 +142,17 @@ class Tag {
|
||||
String toString() {
|
||||
return "$name${translatedName == null ? "" : "($translatedName)"}";
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if (other is Tag) {
|
||||
return name == other.name;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => name.hashCode;
|
||||
}
|
||||
|
||||
class IllustImage {
|
||||
@@ -171,6 +182,10 @@ class Illust {
|
||||
bool isBookmarked;
|
||||
final bool isAi;
|
||||
|
||||
bool get isR18 => tags.contains(const Tag("R-18", null));
|
||||
|
||||
bool get isR18G => tags.contains(const Tag("R-18G", null));
|
||||
|
||||
Illust.fromJson(Map<String, dynamic> json)
|
||||
: id = json['id'],
|
||||
title = json['title'],
|
||||
@@ -211,7 +226,7 @@ class Illust {
|
||||
totalView = json['total_view'],
|
||||
totalBookmarks = json['total_bookmarks'],
|
||||
isBookmarked = json['is_bookmarked'],
|
||||
isAi = json['is_ai'] != 1;
|
||||
isAi = json['illust_ai_type'] == 2;
|
||||
}
|
||||
|
||||
class TrendingTag {
|
||||
|
Reference in New Issue
Block a user