From b67bf16d4f3f0a238472021f58eb467b48560a2b Mon Sep 17 00:00:00 2001 From: litetex <40789489+litetex@users.noreply.github.com> Date: Sun, 26 Dec 2021 23:57:54 +0100 Subject: [PATCH] Minified code --- .../org/schabi/newpipe/util/NavigationHelper.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) 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 d5be71f15..bb305aec7 100644 --- a/app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java +++ b/app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java @@ -168,14 +168,12 @@ public final class NavigationHelper { public static void playOnBackgroundPlayer(final Context context, final PlayQueue queue, final boolean resumePlayback) { - final int toastText; - if (PlayerHolder.getInstance().getType() == MainPlayer.PlayerType.AUDIO) { - toastText = R.string.background_player_already_playing_toast; - } else { - toastText = R.string.background_player_playing_toast; - } - - Toast.makeText(context, toastText, Toast.LENGTH_SHORT) + Toast.makeText( + context, + PlayerHolder.getInstance().getType() == PlayerType.AUDIO + ? R.string.background_player_playing_toast + : R.string.background_player_playing_toast, + Toast.LENGTH_SHORT) .show(); final Intent intent = getPlayerIntent(context, MainPlayer.class, queue, resumePlayback);