This commit is contained in:
rang 2025-12-29 17:56:03 +08:00
parent 6ffd76a194
commit b0f5dd8951
18 changed files with 441 additions and 64 deletions

View file

@ -49,7 +49,9 @@ class ChapterSelectionButton extends HookConsumerWidget {
class ChapterSelectionModal extends HookConsumerWidget {
const ChapterSelectionModal({
super.key,
this.back = true,
});
final bool back;
@override
Widget build(BuildContext context, WidgetRef ref) {
@ -108,8 +110,11 @@ class ChapterSelectionModal extends HookConsumerWidget {
: const Icon(Icons.play_arrow),
selected: isCurrent,
onTap: () {
Navigator.of(context).pop();
ref.read(absPlayerProvider).switchChapter(chapter.id);
if (back) {
Navigator.of(context).pop();
} else {
ref.read(absPlayerProvider).switchChapter(chapter.id);
}
},
);
},