Skip to content

Commit 48ae830

Browse files
authored
Merge pull request TeamNewPipe#9653 from petlyh/fix-popup-crash
Ask for permission when enqueuing in a popup
2 parents 03f5dd7 + edff696 commit 48ae830

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,11 @@ public static void playOnBackgroundPlayer(final Context context,
183183
public static void enqueueOnPlayer(final Context context,
184184
final PlayQueue queue,
185185
final PlayerType playerType) {
186+
if ((playerType == PlayerType.POPUP) && !PermissionHelper.isPopupEnabled(context)) {
187+
PermissionHelper.showPopupEnablementToast(context);
188+
return;
189+
}
190+
186191
Toast.makeText(context, R.string.enqueued, Toast.LENGTH_SHORT).show();
187192
final Intent intent = getPlayerEnqueueIntent(context, PlayerService.class, queue);
188193

0 commit comments

Comments
 (0)