From 9ea596766980641929068bcc9ec253bf39cd803b Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Wed, 20 Aug 2014 13:17:33 -0700 Subject: Remove bookmark from song menu if one doesn't exist --- src/github/daneren2005/dsub/fragments/SubsonicFragment.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/github/daneren2005/dsub/fragments/SubsonicFragment.java b/src/github/daneren2005/dsub/fragments/SubsonicFragment.java index 7787c363..23161e7a 100644 --- a/src/github/daneren2005/dsub/fragments/SubsonicFragment.java +++ b/src/github/daneren2005/dsub/fragments/SubsonicFragment.java @@ -188,6 +188,10 @@ public class SubsonicFragment extends Fragment implements SwipeRefreshLayout.OnR } else { inflater.inflate(R.menu.select_song_context, menu); + + if(entry.getBookmark() == null) { + menu.removeItem(R.id.bookmark_menu_delete); + } } menu.findItem(entry.isDirectory() ? R.id.album_menu_star : R.id.song_menu_star).setTitle(entry.isStarred() ? R.string.common_unstar : R.string.common_star); } else { @@ -218,6 +222,9 @@ public class SubsonicFragment extends Fragment implements SwipeRefreshLayout.OnR menu.setGroupVisible(R.id.server_1_8, false); menu.setGroupVisible(R.id.hide_star, false); } + if(!ServerInfo.checkServerVersion(context, "1.9")) { + menu.setGroupVisible(R.id.server_1_9, false); + } if(!ServerInfo.checkServerVersion(context, "1.10.1")) { menu.setGroupVisible(R.id.server_1_10, false); } -- cgit v1.2.3