From dbcb7e5c21777a16b0f5d3ceb5642ed42a4a981a Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Thu, 9 Apr 2020 13:06:39 +0200 Subject: [PATCH] Restore ExternalPlayer visibility when restoring instance state --- .../java/de/danoeh/antennapod/activity/MainActivity.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java index 6b1e5e7d6..a24ec5626 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java @@ -309,6 +309,15 @@ public class MainActivity extends CastEnabledActivity { outState.putInt(SAVE_BACKSTACK_COUNT, getSupportFragmentManager().getBackStackEntryCount()); } + @Override + protected void onRestoreInstanceState(Bundle savedInstanceState) { + super.onRestoreInstanceState(savedInstanceState); + + if (getBottomSheet().getState() == BottomSheetBehavior.STATE_EXPANDED) { + bottomSheetCallback.onSlide(null, 1.0f); + } + } + @Override public void onStart() { super.onStart();