diff options
Diffstat (limited to 'app/src/main/java')
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/adapter/EntryGridAdapter.java | 7 | ||||
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/adapter/EntryGridAdapter.java b/app/src/main/java/github/daneren2005/dsub/adapter/EntryGridAdapter.java index 78ef13ed..a9a7a3cf 100644 --- a/app/src/main/java/github/daneren2005/dsub/adapter/EntryGridAdapter.java +++ b/app/src/main/java/github/daneren2005/dsub/adapter/EntryGridAdapter.java @@ -46,6 +46,7 @@ public class EntryGridAdapter extends SectionAdapter<Entry> { private boolean largeAlbums; private boolean showArtist = false; private boolean removeFromPlaylist = false; + private boolean removeStarred = true; private View header; public EntryGridAdapter(Context context, List<Entry> entries, ImageLoader imageLoader, boolean largeCell) { @@ -129,6 +130,9 @@ public class EntryGridAdapter extends SectionAdapter<Entry> { public void setRemoveFromPlaylist(boolean removeFromPlaylist) { this.removeFromPlaylist = removeFromPlaylist; } + public void setRemoveStarred(boolean removeStarred) { + this.removeStarred = removeStarred; + } @Override public void onCreateActionModeMenu(Menu menu, MenuInflater menuInflater) { @@ -141,5 +145,8 @@ public class EntryGridAdapter extends SectionAdapter<Entry> { if(!removeFromPlaylist) { menu.removeItem(R.id.menu_remove_playlist); } + if(removeStarred) { + menu.removeItem(R.id.menu_unstar); + } } } diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java index 6fbf49bc..c138b04e 100644 --- a/app/src/main/java/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java +++ b/app/src/main/java/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java @@ -675,6 +675,7 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Section if(albumListType == null || "starred".equals(albumListType)) { entryGridAdapter = new EntryGridAdapter(context, entries, getImageLoader(), largeAlbums); entryGridAdapter.setRemoveFromPlaylist(playlistId != null); + entryGridAdapter.setRemoveStarred(albumListType == null); } else { if("alphabeticalByName".equals(albumListType)) { entryGridAdapter = new AlphabeticalAlbumAdapter(context, entries, getImageLoader(), largeAlbums); @@ -1019,7 +1020,7 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Section List<Entry> artists = new ArrayList<Entry>(); List<Entry> albums = new ArrayList<Entry>(); for(Entry entry: unstar) { - if(entry.isDirectory()) { + if(entry.isDirectory() && Util.isTagBrowsing(context)) { if(entry.isAlbum()) { albums.add(entry); } else { |