diff --git a/lib/foundation/local.dart b/lib/foundation/local.dart index eee529f..9a0c100 100644 --- a/lib/foundation/local.dart +++ b/lib/foundation/local.dart @@ -109,15 +109,42 @@ class LocalComic with HistoryMixin implements Comic { void read() { var history = HistoryManager().find(id, comicType); + int? firstDownloadedChapter; + int? firstDownloadedChapterGroup; + if (downloadedChapters.isNotEmpty && chapters != null) { + final chapters = this.chapters!; + if (chapters.isGrouped) { + for (int i=0; i Reader( type: comicType, cid: id, name: title, chapters: chapters, - initialChapter: history?.ep, + initialChapter: history?.ep ?? firstDownloadedChapter, initialPage: history?.page, - initialChapterGroup: history?.group, + initialChapterGroup: history?.group ?? firstDownloadedChapterGroup, history: history ?? History.fromModel( model: this,