From b798b02d91e42ee449a4f635f1a5598a61f15ab7 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Fri, 3 Oct 2014 15:19:19 -0700 Subject: Forgot to add artist to deletion criteria --- src/github/daneren2005/dsub/fragments/SubsonicFragment.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/github/daneren2005/dsub/fragments/SubsonicFragment.java b/src/github/daneren2005/dsub/fragments/SubsonicFragment.java index e6443aeb..2b9767c2 100644 --- a/src/github/daneren2005/dsub/fragments/SubsonicFragment.java +++ b/src/github/daneren2005/dsub/fragments/SubsonicFragment.java @@ -290,19 +290,24 @@ public class SubsonicFragment extends Fragment implements SwipeRefreshLayout.OnR else if(info.targetView instanceof AlbumCell || info.targetView instanceof AlbumView || info.targetView instanceof ArtistView || info.targetView instanceof ArtistEntryView) { File folder; + int id; if(info.targetView instanceof AlbumCell) { folder = ((AlbumCell) info.targetView).getFile(); + id = R.id.album_menu_delete; } else if(info.targetView instanceof AlbumView) { folder = ((AlbumView) info.targetView).getFile(); + id = R.id.album_menu_delete; } else if(info.targetView instanceof ArtistView) { folder = ((ArtistView) info.targetView).getFile(); + id = R.id.artist_menu_delete; } else if(info.targetView instanceof ArtistEntryView) { folder = ((ArtistEntryView) info.targetView).getFile(); + id = R.id.artist_menu_delete; } try { if(!folder.exists()) { - menu.removeItem(R.id.album_menu_delete); + menu.removeItem(id); } } catch(Exception e) { Log.w(TAG, "Failed to lookup album directory info", e); -- cgit v1.2.3