mirror of
https://github.com/venera-app/venera.git
synced 2025-09-28 08:17:25 +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,
|
e.subtitle,
|
||||||
null,
|
null,
|
||||||
getDescription(e),
|
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,
|
||||||
null,
|
null,
|
||||||
);
|
);
|
||||||
@@ -113,11 +115,16 @@ class _HistoryPageState extends State<HistoryPage> {
|
|||||||
text: 'Remove'.tl,
|
text: 'Remove'.tl,
|
||||||
color: context.colorScheme.error,
|
color: context.colorScheme.error,
|
||||||
onClick: () {
|
onClick: () {
|
||||||
if (c.sourceKey.startsWith("Invalid")) {
|
if (c.sourceKey.startsWith("Unknown")) {
|
||||||
HistoryManager().remove(
|
HistoryManager().remove(
|
||||||
c.id,
|
c.id,
|
||||||
ComicType(int.parse(c.sourceKey.split(':')[1])),
|
ComicType(int.parse(c.sourceKey.split(':')[1])),
|
||||||
);
|
);
|
||||||
|
} else if (c.sourceKey == 'local') {
|
||||||
|
HistoryManager().remove(
|
||||||
|
c.id,
|
||||||
|
ComicType.local,
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
HistoryManager().remove(
|
HistoryManager().remove(
|
||||||
c.id,
|
c.id,
|
||||||
|
Reference in New Issue
Block a user