From 21863a59f40ba12a3d7b0db225aaa510fc863bc7 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Fri, 14 Mar 2014 11:15:32 -0700 Subject: Fix share not being on now playing, not hiding star if set --- src/github/daneren2005/dsub/fragments/DownloadFragment.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/github/daneren2005') diff --git a/src/github/daneren2005/dsub/fragments/DownloadFragment.java b/src/github/daneren2005/dsub/fragments/DownloadFragment.java index bf62fce0..6c9be122 100644 --- a/src/github/daneren2005/dsub/fragments/DownloadFragment.java +++ b/src/github/daneren2005/dsub/fragments/DownloadFragment.java @@ -546,6 +546,14 @@ public class DownloadFragment extends SubsonicFragment implements OnGestureListe if (downloadFile.getSong().getGrandParent() == null) { 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); + } } } @@ -715,6 +723,10 @@ public class DownloadFragment extends SubsonicFragment implements OnGestureListe case R.id.menu_info: displaySongInfo(song.getSong()); return true; + case R.id.menu_share: + songs = new ArrayList(1); + songs.add(song.getSong()); + createShare(songs); default: return false; } -- cgit v1.2.3