From 28e5ee51ec507aca6c4c5f5555675ac0e02fb66e Mon Sep 17 00:00:00 2001 From: dotvirus <33938500+dotvirus@users.noreply.github.com> Date: Fri, 18 Jan 2019 23:16:02 +0100 Subject: [PATCH 1/2] Add playlist to queue when long click on 'Background' --- .../newpipe/fragments/list/playlist/PlaylistFragment.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java index 0019a3819..63a2f746e 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java @@ -305,6 +305,14 @@ public class PlaylistFragment extends BaseListInfoFragment { NavigationHelper.playOnPopupPlayer(activity, getPlayQueue())); headerBackgroundButton.setOnClickListener(view -> NavigationHelper.playOnBackgroundPlayer(activity, getPlayQueue())); + + headerBackgroundButton.setOnLongClickListener(new View.OnLongClickListener() { + @Override + public boolean onLongClick(View v) { + NavigationHelper.enqueueOnBackgroundPlayer(activity, getPlayQueue()); + return true; + } + }); } private PlayQueue getPlayQueue() { From c0aca723daeb47095d58f0dfe4de8e841a592f9f Mon Sep 17 00:00:00 2001 From: dotvirus <33938500+dotvirus@users.noreply.github.com> Date: Fri, 18 Jan 2019 23:58:24 +0100 Subject: [PATCH 2/2] Update PlaylistFragment.java --- .../fragments/list/playlist/PlaylistFragment.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java index 63a2f746e..d552b4e66 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java @@ -306,12 +306,14 @@ public class PlaylistFragment extends BaseListInfoFragment { headerBackgroundButton.setOnClickListener(view -> NavigationHelper.playOnBackgroundPlayer(activity, getPlayQueue())); - headerBackgroundButton.setOnLongClickListener(new View.OnLongClickListener() { - @Override - public boolean onLongClick(View v) { - NavigationHelper.enqueueOnBackgroundPlayer(activity, getPlayQueue()); - return true; - } + headerPopupButton.setOnLongClickListener(view -> { + NavigationHelper.enqueueOnPopupPlayer(activity, getPlayQueue()); + return true; + }); + + headerBackgroundButton.setOnLongClickListener(view -> { + NavigationHelper.enqueueOnBackgroundPlayer(activity, getPlayQueue()); + return true; }); }