aboutsummaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java9
-rw-r--r--app/src/main/res/menu/select_song_context.xml6
-rw-r--r--app/src/main/res/menu/select_song_context_offline.xml9
3 files changed, 22 insertions, 2 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java
index b7478c8a..818324ed 100644
--- a/app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java
+++ b/app/src/main/java/github/daneren2005/dsub/fragments/SubsonicFragment.java
@@ -309,6 +309,12 @@ public class SubsonicFragment extends Fragment implements SwipeRefreshLayout.OnR
if(entry.getBookmark() == null) {
menu.removeItem(R.id.bookmark_menu_delete);
}
+
+
+ String songPressAction = Util.getSongPressAction(context);
+ if(!"next".equals(songPressAction) && !"last".equals(songPressAction)) {
+ menu.setGroupVisible(R.id.hide_play_now, false);
+ }
}
} else {
if(Util.isOffline(context)) {
@@ -430,6 +436,9 @@ public class SubsonicFragment extends Fragment implements SwipeRefreshLayout.OnR
case R.id.album_menu_share:
createShare(songs);
break;
+ case R.id.song_menu_play_now:
+ playNow(songs);
+ break;
case R.id.song_menu_play_next:
getDownloadService().download(songs, false, false, true, false);
break;
diff --git a/app/src/main/res/menu/select_song_context.xml b/app/src/main/res/menu/select_song_context.xml
index b68dcad9..46eaaa38 100644
--- a/app/src/main/res/menu/select_song_context.xml
+++ b/app/src/main/res/menu/select_song_context.xml
@@ -15,6 +15,12 @@
android:title="@string/menu.show_artist"/>
</group>
+ <group android:id="@+id/hide_play_now">
+ <item
+ android:id="@+id/song_menu_play_now"
+ android:title="@string/common.play_now"/>
+ </group>
+
<group android:id="@+id/hide_play_next">
<item
android:id="@+id/song_menu_play_next"
diff --git a/app/src/main/res/menu/select_song_context_offline.xml b/app/src/main/res/menu/select_song_context_offline.xml
index d7182068..cc914563 100644
--- a/app/src/main/res/menu/select_song_context_offline.xml
+++ b/app/src/main/res/menu/select_song_context_offline.xml
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:compat="http://schemas.android.com/apk/res-auto">
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/song_menu_info"
@@ -16,6 +15,12 @@
android:title="@string/menu.show_artist"/>
</group>
+ <group android:id="@+id/hide_play_now">
+ <item
+ android:id="@+id/song_menu_play_now"
+ android:title="@string/common.play_now"/>
+ </group>
+
<group android:id="@+id/hide_play_next">
<item
android:id="@+id/song_menu_play_next"