From 31e391ddae4da3c1187c2e1febc4e6d620278057 Mon Sep 17 00:00:00 2001 From: nyne Date: Thu, 13 Feb 2025 16:51:38 +0800 Subject: [PATCH] Fix history --- lib/pages/comic_page.dart | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/pages/comic_page.dart b/lib/pages/comic_page.dart index caeb801..2425f28 100644 --- a/lib/pages/comic_page.dart +++ b/lib/pages/comic_page.dart @@ -60,7 +60,8 @@ class _ComicPageState extends LoadingState @override void onReadEnd() { - // The history is passed by reference, so it will be updated automatically. + history ??= HistoryManager() + .findSync(widget.id, ComicType(widget.sourceKey.hashCode)); update(); } @@ -678,7 +679,8 @@ abstract mixin class _ComicPageActions { /// /// [page] the page number, start from 1 void read([int? ep, int? page]) { - App.rootContext.to( + App.rootContext + .to( () => Reader( type: comic.comicType, cid: comic.id, @@ -690,7 +692,8 @@ abstract mixin class _ComicPageActions { author: comic.findAuthor() ?? '', tags: comic.plainTags, ), - ).then((_) { + ) + .then((_) { onReadEnd(); }); }