[Comic Source] New model PageJumpTarget. All page jump operations now use PageJumpTarget.

This commit is contained in:
2025-04-04 22:47:43 +08:00
parent 971fc1da92
commit 463ad5b5bc
12 changed files with 266 additions and 226 deletions

View File

@@ -300,21 +300,8 @@ abstract mixin class _ComicPageActions {
'keyword': tag,
};
var context = App.mainNavigatorKey!.currentContext!;
if (config['action'] == 'search') {
context.to(() => SearchResultPage(
text: config['keyword'] ?? '',
sourceKey: comicSource.key,
options: const [],
));
} else if (config['action'] == 'category') {
context.to(
() => CategoryComicsPage(
category: config['keyword'] ?? '',
categoryKey: comicSource.categoryData!.key,
param: config['param'],
),
);
}
var target = PageJumpTarget.parse(comicSource.key, config);
target.jump(context);
}
void showMoreActions() {