feat: add dedicated e621 tab in Favorites and fix comic post-not-found parsing (v3.7.1)
Build and Release / Build Windows x64 (push) Has been cancelled
Build and Release / Build macOS (push) Has been cancelled

This commit is contained in:
2026-09-05 20:19:27 +03:00
parent cc6ad2d7bf
commit cd1a9ccc0c
7 changed files with 515 additions and 6 deletions
+13 -2
View File
@@ -6,8 +6,19 @@ class E621Mapper {
required String providerId,
required String providerName,
}) {
final posts = data is Map ? data['posts'] : data;
final items = posts is List ? posts : const [];
if (data is Map && data['post'] is Map) {
return [
postFromJson(
Map<String, dynamic>.from(data['post'] as Map),
providerId: providerId,
providerName: providerName,
),
];
}
final posts = data is Map ? (data['posts'] ?? data['post']) : data;
final items = posts is List
? posts
: (posts is Map ? [posts] : const []);
return items
.whereType<Map>()
.map((item) => postFromJson(