aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java5
-rw-r--r--app/src/main/java/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java6
2 files changed, 8 insertions, 3 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java b/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java
index cd746516..d67893ef 100644
--- a/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java
+++ b/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java
@@ -493,8 +493,9 @@ public class SubsonicActivity extends AppCompatActivity implements OnItemSelecte
menuInflater.inflate(R.menu.drawer_menu, menu);
} else if(currentFragment != null) {
try {
- currentFragment.setContext(this);
- currentFragment.onCreateOptionsMenu(menu, menuInflater);
+ SubsonicFragment fragment = getCurrentFragment();
+ fragment.setContext(this);
+ fragment.onCreateOptionsMenu(menu, menuInflater);
if(isTouchscreen()) {
menu.setGroupVisible(R.id.not_touchscreen, false);
diff --git a/app/src/main/java/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java b/app/src/main/java/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java
index 7808d8c0..7cb11392 100644
--- a/app/src/main/java/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java
+++ b/app/src/main/java/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java
@@ -458,7 +458,11 @@ public class SubsonicFragmentActivity extends SubsonicActivity implements Downlo
@Override
protected SubsonicFragment getCurrentFragment() {
if(slideUpPanel.getPanelState() == SlidingUpPanelLayout.PanelState.EXPANDED) {
- return nowPlayingFragment;
+ if(secondaryFragment == null) {
+ return nowPlayingFragment;
+ } else {
+ return secondaryFragment;
+ }
} else {
return super.getCurrentFragment();
}