history page, comic menu

This commit is contained in:
nyne
2024-10-09 17:09:28 +08:00
parent 90b9265ca0
commit b68d52dfd7
10 changed files with 300 additions and 91 deletions

View File

@@ -129,6 +129,14 @@ class History {
HistoryManager().addHistory(history);
return history;
}
@override
bool operator ==(Object other) {
return other is History && type == other.type && id == other.id;
}
@override
int get hashCode => Object.hash(id, type);
}
class HistoryManager with ChangeNotifier {
@@ -190,6 +198,7 @@ class HistoryManager with ChangeNotifier {
void clearHistory() {
_db.execute("delete from history;");
updateCache();
notifyListeners();
}
void remove(String id, ComicType type) async {