aboutsummaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2015-08-26 17:07:41 -0700
committerScott Jackson <daneren2005@gmail.com>2015-08-26 17:07:41 -0700
commitf64a25bdbe6ce01c3f1c1ac301e49a1d86fb5066 (patch)
tree4c2110fa98be52d1103a652f5dd2767e43b0a170 /app/src/main
parenta83d2932128d5ead3c9a4fd36d42f4c8c152fd10 (diff)
downloaddsub-f64a25bdbe6ce01c3f1c1ac301e49a1d86fb5066.tar.gz
dsub-f64a25bdbe6ce01c3f1c1ac301e49a1d86fb5066.tar.bz2
dsub-f64a25bdbe6ce01c3f1c1ac301e49a1d86fb5066.zip
Put mass unstarring back
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/github/daneren2005/dsub/adapter/EntryGridAdapter.java7
-rw-r--r--app/src/main/java/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java3
-rw-r--r--app/src/main/res/layout-port/download.xml5
-rw-r--r--app/src/main/res/menu/multiselect_media.xml4
4 files changed, 16 insertions, 3 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 {
diff --git a/app/src/main/res/layout-port/download.xml b/app/src/main/res/layout-port/download.xml
index 96e2c864..899b46b7 100644
--- a/app/src/main/res/layout-port/download.xml
+++ b/app/src/main/res/layout-port/download.xml
@@ -41,7 +41,8 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@color/overlayColor"
- android:layout_gravity="center_horizontal|bottom">
+ android:layout_gravity="center_horizontal|bottom"
+ android:visibility="invisible">
<LinearLayout
android:layout_width="wrap_content"
@@ -63,7 +64,7 @@
<ImageButton
android:id="@+id/download_star"
style="@style/DownloadActionImageButton"
- android:src="@android:drawable/star_big_off"/>
+ android:src="@drawable/ic_toggle_star_outline_dark"/>
<ImageButton
android:id="@+id/download_bookmark"
diff --git a/app/src/main/res/menu/multiselect_media.xml b/app/src/main/res/menu/multiselect_media.xml
index 75865a14..6adb4567 100644
--- a/app/src/main/res/menu/multiselect_media.xml
+++ b/app/src/main/res/menu/multiselect_media.xml
@@ -33,6 +33,10 @@
android:id="@+id/menu_remove_playlist"
android:title="@string/menu.remove_playlist"/>
+ <item
+ android:id="@+id/menu_unstar"
+ android:title="@string/common.unstar"/>
+
<group android:id="@+id/hide_play_next">
<item
android:id="@+id/menu_play_next"