Skip to content

Commit

Permalink
2.8.6 fix dialog pop
Browse files Browse the repository at this point in the history
  • Loading branch information
arianneorpilla committed Jul 2, 2023
1 parent ecb34fe commit cbf7ceb
Showing 1 changed file with 30 additions and 6 deletions.
36 changes: 30 additions & 6 deletions yuuna/lib/src/pages/implementations/player_source_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,21 @@ class _PlayerSourcePageState extends BaseSourcePageState<PlayerSourcePage>
),
actions: [
TextButton(
onPressed: () {
Navigator.pop(context);
Navigator.pop(context);
onPressed: () async {
if (mounted) {
Navigator.pop(context);
}

await onSourcePagePop();

if (mounted) {
Navigator.pop(context, true);
}
await appModel.closeMedia(
ref: ref,
mediaSource: appModel.currentMediaSource!,
item: widget.item,
);
},
child: Text(t.dialog_close),
),
Expand Down Expand Up @@ -342,9 +354,21 @@ class _PlayerSourcePageState extends BaseSourcePageState<PlayerSourcePage>
),
actions: [
TextButton(
onPressed: () {
Navigator.pop(context);
Navigator.pop(context);
onPressed: () async {
if (mounted) {
Navigator.pop(context);
}

await onSourcePagePop();

if (mounted) {
Navigator.pop(context, true);
}
await appModel.closeMedia(
ref: ref,
mediaSource: appModel.currentMediaSource!,
item: widget.item,
);
},
child: Text(t.dialog_close),
),
Expand Down

0 comments on commit cbf7ceb

Please sign in to comment.