Use helper function to close now playing

This commit is contained in:
Andrew Rabert 2018-07-03 17:34:58 -04:00
parent 59c814cf16
commit 405fc8cafd
1 changed files with 2 additions and 2 deletions

View File

@ -418,7 +418,7 @@ public class SubsonicFragmentActivity extends SubsonicActivity implements Downlo
@Override
public void onBackPressed() {
if (slideUpPanel.getPanelState() == SlidingUpPanelLayout.PanelState.EXPANDED && secondaryFragment == null) {
slideUpPanel.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED);
closeNowPlaying();
} else if (slideUpPanel.getPanelState() == SlidingUpPanelLayout.PanelState.EXPANDED) {
removeCurrent();
} else {
@ -488,7 +488,7 @@ public class SubsonicFragmentActivity extends SubsonicActivity implements Downlo
super.drawerItemSelected(fragmentType);
if (slideUpPanel.getPanelState() == SlidingUpPanelLayout.PanelState.EXPANDED) {
slideUpPanel.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED);
closeNowPlaying();
}
}