mirror of
https://github.com/venera-app/venera.git
synced 2025-09-27 07:47:24 +00:00
Improve comic chapters.
This commit is contained in:
@@ -98,7 +98,7 @@ abstract mixin class _ComicPageActions {
|
||||
void read([int? ep, int? page]) {
|
||||
App.rootContext
|
||||
.to(
|
||||
() => Reader(
|
||||
() => Reader(
|
||||
type: comic.comicType,
|
||||
cid: comic.id,
|
||||
name: comic.title,
|
||||
@@ -219,7 +219,7 @@ abstract mixin class _ComicPageActions {
|
||||
isGettingLink = true;
|
||||
});
|
||||
var res =
|
||||
await comicSource.archiveDownloader!.getDownloadUrl(
|
||||
await comicSource.archiveDownloader!.getDownloadUrl(
|
||||
comic.id,
|
||||
archives![selected].id,
|
||||
);
|
||||
@@ -262,7 +262,7 @@ abstract mixin class _ComicPageActions {
|
||||
if (localComic != null) {
|
||||
for (int i = 0; i < comic.chapters!.length; i++) {
|
||||
if (localComic.downloadedChapters
|
||||
.contains(comic.chapters!.keys.elementAt(i))) {
|
||||
.contains(comic.chapters!.ids.elementAt(i))) {
|
||||
downloaded.add(i);
|
||||
}
|
||||
}
|
||||
@@ -270,8 +270,8 @@ abstract mixin class _ComicPageActions {
|
||||
await showSideBar(
|
||||
App.rootContext,
|
||||
_SelectDownloadChapter(
|
||||
comic.chapters!.values.toList(),
|
||||
(v) => selected = v,
|
||||
comic.chapters!.titles.toList(),
|
||||
(v) => selected = v,
|
||||
downloaded,
|
||||
),
|
||||
);
|
||||
@@ -281,7 +281,7 @@ abstract mixin class _ComicPageActions {
|
||||
comicId: comic.id,
|
||||
comic: comic,
|
||||
chapters: selected!.map((i) {
|
||||
return comic.chapters!.keys.elementAt(i);
|
||||
return comic.chapters!.ids.elementAt(i);
|
||||
}).toList(),
|
||||
));
|
||||
}
|
||||
@@ -298,13 +298,13 @@ abstract mixin class _ComicPageActions {
|
||||
var context = App.mainNavigatorKey!.currentContext!;
|
||||
if (config['action'] == 'search') {
|
||||
context.to(() => SearchResultPage(
|
||||
text: config['keyword'] ?? '',
|
||||
sourceKey: comicSource.key,
|
||||
options: const [],
|
||||
));
|
||||
text: config['keyword'] ?? '',
|
||||
sourceKey: comicSource.key,
|
||||
options: const [],
|
||||
));
|
||||
} else if (config['action'] == 'category') {
|
||||
context.to(
|
||||
() => CategoryComicsPage(
|
||||
() => CategoryComicsPage(
|
||||
category: config['keyword'] ?? '',
|
||||
categoryKey: comicSource.categoryData!.key,
|
||||
param: config['param'],
|
||||
@@ -432,4 +432,4 @@ abstract mixin class _ComicPageActions {
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user