From 1c9f68bcae833fd2e3c6964fe29d30f19c800101 Mon Sep 17 00:00:00 2001 From: vhouriet Date: Tue, 5 Oct 2021 18:15:36 +0200 Subject: [PATCH] Fix clicking timestamp shows Toast "Playing in popup mode" Fixes #6662 --- .../main/java/org/schabi/newpipe/util/NavigationHelper.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 afa826677..6939e652d 100644 --- a/app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java +++ b/app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java @@ -146,7 +146,9 @@ public final class NavigationHelper { return; } - Toast.makeText(context, R.string.popup_playing_toast, Toast.LENGTH_SHORT).show(); + if (PlayerHolder.getInstance().getType() != PlayerType.POPUP) { + Toast.makeText(context, R.string.popup_playing_toast, Toast.LENGTH_SHORT).show(); + } final Intent intent = getPlayerIntent(context, MainPlayer.class, queue, resumePlayback); intent.putExtra(Player.PLAYER_TYPE, MainPlayer.PlayerType.POPUP.ordinal()); ContextCompat.startForegroundService(context, intent);