mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-18 19:56:32 -07:00
fix: Long press "play" button with dpad navigation
This commit is contained in:
parent
fd35ffb004
commit
3ce0ed6dbc
9 changed files with 188 additions and 121 deletions
|
|
@ -76,21 +76,28 @@ class _SeriesDetailScreenState extends ConsumerState<SeriesDetailScreen> {
|
|||
OverviewHeader(
|
||||
name: details.name,
|
||||
image: details.images,
|
||||
playButton: MediaPlayButton(
|
||||
item: details.nextUp,
|
||||
onPressed: details.nextUp != null
|
||||
? () async {
|
||||
await details.nextUp.play(context, ref);
|
||||
playButton: details.nextUp != null
|
||||
? MediaPlayButton(
|
||||
item: details.nextUp,
|
||||
onPressed: (restart) async {
|
||||
await details.nextUp.play(
|
||||
context,
|
||||
ref,
|
||||
startPosition: restart ? Duration.zero : null,
|
||||
);
|
||||
ref.read(providerId.notifier).fetchDetails(widget.item);
|
||||
}
|
||||
: null,
|
||||
onLongPressed: details.nextUp != null
|
||||
? () async {
|
||||
await details.nextUp.play(context, ref, showPlaybackOption: true);
|
||||
},
|
||||
onLongPressed: (restart) async {
|
||||
await details.nextUp.play(
|
||||
context,
|
||||
ref,
|
||||
showPlaybackOption: true,
|
||||
startPosition: restart ? Duration.zero : null,
|
||||
);
|
||||
ref.read(providerId.notifier).fetchDetails(widget.item);
|
||||
}
|
||||
: null,
|
||||
),
|
||||
},
|
||||
)
|
||||
: null,
|
||||
centerButtons: Wrap(
|
||||
spacing: 8,
|
||||
runSpacing: 8,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue