diff --git a/lib/pages/history_page.dart b/lib/pages/history_page.dart index 05c9466..37e8c4e 100644 --- a/lib/pages/history_page.dart +++ b/lib/pages/history_page.dart @@ -97,7 +97,9 @@ class _HistoryPageState extends State { e.subtitle, null, getDescription(e), - e.type.comicSource?.key ?? "Invalid:${e.type.value}", + e.type == ComicType.local + ? 'local' + : e.type.comicSource?.key ?? "Unknown:${e.type.value}", null, null, ); @@ -113,11 +115,16 @@ class _HistoryPageState extends State { text: 'Remove'.tl, color: context.colorScheme.error, onClick: () { - if (c.sourceKey.startsWith("Invalid")) { + if (c.sourceKey.startsWith("Unknown")) { HistoryManager().remove( c.id, ComicType(int.parse(c.sourceKey.split(':')[1])), ); + } else if (c.sourceKey == 'local') { + HistoryManager().remove( + c.id, + ComicType.local, + ); } else { HistoryManager().remove( c.id,