aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/github/daneren2005/dsub/fragments/NowPlayingFragment.java8
-rw-r--r--src/github/daneren2005/dsub/fragments/SubsonicFragment.java5
2 files changed, 6 insertions, 7 deletions
diff --git a/src/github/daneren2005/dsub/fragments/NowPlayingFragment.java b/src/github/daneren2005/dsub/fragments/NowPlayingFragment.java
index 924c5bd0..e7c34d9a 100644
--- a/src/github/daneren2005/dsub/fragments/NowPlayingFragment.java
+++ b/src/github/daneren2005/dsub/fragments/NowPlayingFragment.java
@@ -578,13 +578,7 @@ public class NowPlayingFragment extends SubsonicFragment implements OnGestureLis
menu.findItem(R.id.menu_show_artist).setVisible(false);
}
- SharedPreferences prefs = Util.getPreferences(context);
- if(!prefs.getBoolean(Constants.PREFERENCES_KEY_MENU_STAR, true)) {
- menu.setGroupVisible(R.id.hide_star, false);
- }
- if(!prefs.getBoolean(Constants.PREFERENCES_KEY_MENU_SHARED, true)) {
- menu.setGroupVisible(R.id.hide_share, false);
- }
+ hideMenuItems(menu);
}
}
diff --git a/src/github/daneren2005/dsub/fragments/SubsonicFragment.java b/src/github/daneren2005/dsub/fragments/SubsonicFragment.java
index 270cef2b..1e3f832d 100644
--- a/src/github/daneren2005/dsub/fragments/SubsonicFragment.java
+++ b/src/github/daneren2005/dsub/fragments/SubsonicFragment.java
@@ -203,6 +203,10 @@ public class SubsonicFragment extends Fragment implements SwipeRefreshLayout.OnR
}
}
+ hideMenuItems(menu);
+ }
+
+ protected void hideMenuItems(ContextMenu menu) {
if(!Util.checkServerVersion(context, "1.8")) {
menu.setGroupVisible(R.id.server_1_8, false);
menu.setGroupVisible(R.id.hide_star, false);
@@ -210,6 +214,7 @@ public class SubsonicFragment extends Fragment implements SwipeRefreshLayout.OnR
if(!Util.checkServerVersion(context, "1.10.1")) {
menu.setGroupVisible(R.id.server_1_10, false);
}
+
SharedPreferences prefs = Util.getPreferences(context);
if(!prefs.getBoolean(Constants.PREFERENCES_KEY_MENU_PLAY_NEXT, true)) {
menu.setGroupVisible(R.id.hide_play_next, false);