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
This commit is contained in:
ByteHamster 2019-04-24 08:53:16 +02:00
parent 09e7f60db8
commit 92165f9021
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}