From 92165f9021e340b9c75ea5404ce3ccd33f064528 Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Wed, 24 Apr 2019 08:53:16 +0200 Subject: [PATCH] Hiding ExternalPlayerFragment onStart If the playback is finished in background, the fragmentLayout is not hidden. Steps to reproduce (without this commit): - Start last item in queue - Leave app using home button - Finish playback by using notification skip button - Resume to AntennaPod - ExternalPlayerFragment is shown (in invalid state) but should be hidden --- .../de/danoeh/antennapod/fragment/ExternalPlayerFragment.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/ExternalPlayerFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/ExternalPlayerFragment.java index d26725436..dca574984 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/ExternalPlayerFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/ExternalPlayerFragment.java @@ -215,7 +215,8 @@ public class ExternalPlayerFragment extends Fragment { .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(media -> updateUi((Playable) media), - error -> Log.e(TAG, Log.getStackTraceString(error))); + error -> Log.e(TAG, Log.getStackTraceString(error)), + () -> fragmentLayout.setVisibility(View.GONE)); return true; }