From 7dbb2b206c438078676f668a9a779537730143fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Jakse?= Date: Thu, 16 Jan 2020 20:46:52 +0100 Subject: [PATCH] Simplify an if expression --- app/src/main/java/org/schabi/newpipe/player/BasePlayer.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java b/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java index cd1ec07f9..46ca3921d 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java @@ -946,10 +946,10 @@ public abstract class BasePlayer implements public void onPlayPause() { if (DEBUG) Log.d(TAG, "onPlayPause() called"); - if (!isPlaying()) { - onPlay(); - } else { + if (isPlaying()) { onPause(); + } else { + onPlay(); } }