mirror of
https://github.com/venera-app/venera.git
synced 2025-09-27 07:47:24 +00:00
fix the issue of opening a local comic in history page
This commit is contained in:
@@ -97,7 +97,9 @@ class _HistoryPageState extends State<HistoryPage> {
|
||||
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<HistoryPage> {
|
||||
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,
|
||||
|
Reference in New Issue
Block a user