mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2026-02-16 06:19:35 +00:00
123
This commit is contained in:
parent
6ffd76a194
commit
b0f5dd8951
18 changed files with 441 additions and 64 deletions
|
|
@ -101,7 +101,9 @@ class PlayerExpandedDesktop extends HookConsumerWidget {
|
|||
),
|
||||
),
|
||||
),
|
||||
child: ChapterSelectionModal(),
|
||||
child: ChapterSelectionModal(
|
||||
back: false,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
},
|
||||
);
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue