mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-01-09 08:50:34 +00:00
Merge pull request #9653 from petlyh/fix-popup-crash
Ask for permission when enqueuing in a popup
This commit is contained in:
commit
48ae830262
@ -183,6 +183,11 @@ public final class NavigationHelper {
|
|||||||
public static void enqueueOnPlayer(final Context context,
|
public static void enqueueOnPlayer(final Context context,
|
||||||
final PlayQueue queue,
|
final PlayQueue queue,
|
||||||
final PlayerType playerType) {
|
final PlayerType playerType) {
|
||||||
|
if ((playerType == PlayerType.POPUP) && !PermissionHelper.isPopupEnabled(context)) {
|
||||||
|
PermissionHelper.showPopupEnablementToast(context);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Toast.makeText(context, R.string.enqueued, Toast.LENGTH_SHORT).show();
|
Toast.makeText(context, R.string.enqueued, Toast.LENGTH_SHORT).show();
|
||||||
final Intent intent = getPlayerEnqueueIntent(context, PlayerService.class, queue);
|
final Intent intent = getPlayerEnqueueIntent(context, PlayerService.class, queue);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user