From edff696ecc503c4a0e964636bbabef71ad1d6def Mon Sep 17 00:00:00 2001 From: petlyh <88139840+petlyh@users.noreply.github.com> Date: Tue, 10 Jan 2023 13:57:36 +0100 Subject: [PATCH] Ask for permission when enqueuing in a popup --- .../main/java/org/schabi/newpipe/util/NavigationHelper.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java b/app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java index 13413e89d..483f5067a 100644 --- a/app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java +++ b/app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java @@ -183,6 +183,11 @@ public final class NavigationHelper { public static void enqueueOnPlayer(final Context context, final PlayQueue queue, final PlayerType playerType) { + if ((playerType == PlayerType.POPUP) && !PermissionHelper.isPopupEnabled(context)) { + PermissionHelper.showPopupEnablementToast(context); + return; + } + Toast.makeText(context, R.string.enqueued, Toast.LENGTH_SHORT).show(); final Intent intent = getPlayerEnqueueIntent(context, PlayerService.class, queue);