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
|
|
@ -82,12 +82,21 @@ class _ItemDetailScreenState extends ConsumerState<EpisodeDetailScreen> {
|
|||
playButton: episodeDetails.playAble
|
||||
? MediaPlayButton(
|
||||
item: episodeDetails,
|
||||
onPressed: () async {
|
||||
await details.episode.play(context, ref);
|
||||
onPressed: (restart) async {
|
||||
await details.episode.play(
|
||||
context,
|
||||
ref,
|
||||
startPosition: restart ? Duration.zero : null,
|
||||
);
|
||||
ref.read(providerInstance.notifier).fetchDetails(widget.item);
|
||||
},
|
||||
onLongPressed: () async {
|
||||
await details.episode.play(context, ref, showPlaybackOption: true);
|
||||
onLongPressed: (restart) async {
|
||||
await details.episode.play(
|
||||
context,
|
||||
ref,
|
||||
showPlaybackOption: true,
|
||||
startPosition: restart ? Duration.zero : null,
|
||||
);
|
||||
ref.read(providerInstance.notifier).fetchDetails(widget.item);
|
||||
},
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue