Improve performance of deleting favorites, coping favorites, moving favorites and deleting downloads. Close #365

This commit is contained in:
2025-05-24 16:24:53 +08:00
parent ed70fdba93
commit dcd6466547
7 changed files with 266 additions and 42 deletions

View File

@@ -116,6 +116,26 @@ class Comic {
toString() => "$sourceKey@$id";
}
class ComicID {
final ComicType type;
final String id;
const ComicID(this.type, this.id);
@override
bool operator ==(Object other) {
if (other is! ComicID) return false;
return other.type == type && other.id == id;
}
@override
int get hashCode => type.hashCode ^ id.hashCode;
@override
String toString() => "$type@$id";
}
class ComicDetails with HistoryMixin {
@override
final String title;