ktlint: Fix multi-line if-else violations
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
parent
2c808b0e86
commit
0641c19388
8 changed files with 37 additions and 21 deletions
|
|
@ -86,8 +86,9 @@ abstract class BasePlayerGestureListener(
|
|||
// ///////////////////////////////////////////////////////////////////
|
||||
|
||||
override fun onDown(e: MotionEvent): Boolean {
|
||||
if (DEBUG)
|
||||
if (DEBUG) {
|
||||
Log.d(TAG, "onDown called with e = [$e]")
|
||||
}
|
||||
|
||||
if (isDoubleTapping && isDoubleTapEnabled) {
|
||||
doubleTapControls?.onDoubleTapProgressDown(getDisplayPortion(e))
|
||||
|
|
@ -108,8 +109,9 @@ abstract class BasePlayerGestureListener(
|
|||
}
|
||||
|
||||
override fun onDoubleTap(e: MotionEvent): Boolean {
|
||||
if (DEBUG)
|
||||
if (DEBUG) {
|
||||
Log.d(TAG, "onDoubleTap called with e = [$e]")
|
||||
}
|
||||
|
||||
onDoubleTap(e, getDisplayPortion(e))
|
||||
return true
|
||||
|
|
@ -136,8 +138,9 @@ abstract class BasePlayerGestureListener(
|
|||
|
||||
private fun startMultiDoubleTap(e: MotionEvent) {
|
||||
if (!isDoubleTapping) {
|
||||
if (DEBUG)
|
||||
if (DEBUG) {
|
||||
Log.d(TAG, "startMultiDoubleTap called with e = [$e]")
|
||||
}
|
||||
|
||||
keepInDoubleTapMode()
|
||||
doubleTapControls?.onDoubleTapStarted(getDisplayPortion(e))
|
||||
|
|
@ -145,8 +148,9 @@ abstract class BasePlayerGestureListener(
|
|||
}
|
||||
|
||||
fun keepInDoubleTapMode() {
|
||||
if (DEBUG)
|
||||
if (DEBUG) {
|
||||
Log.d(TAG, "keepInDoubleTapMode called")
|
||||
}
|
||||
|
||||
isDoubleTapping = true
|
||||
doubleTapHandler.removeCallbacksAndMessages(DOUBLE_TAP)
|
||||
|
|
@ -161,8 +165,9 @@ abstract class BasePlayerGestureListener(
|
|||
}
|
||||
|
||||
fun endMultiDoubleTap() {
|
||||
if (DEBUG)
|
||||
if (DEBUG) {
|
||||
Log.d(TAG, "endMultiDoubleTap called")
|
||||
}
|
||||
|
||||
isDoubleTapping = false
|
||||
doubleTapHandler.removeCallbacksAndMessages(DOUBLE_TAP)
|
||||
|
|
|
|||
|
|
@ -51,15 +51,18 @@ class MainPlayerGestureListener(
|
|||
}
|
||||
|
||||
override fun onSingleTapConfirmed(e: MotionEvent): Boolean {
|
||||
if (DEBUG)
|
||||
if (DEBUG) {
|
||||
Log.d(TAG, "onSingleTapConfirmed() called with: e = [$e]")
|
||||
}
|
||||
|
||||
if (isDoubleTapping)
|
||||
if (isDoubleTapping) {
|
||||
return true
|
||||
}
|
||||
super.onSingleTapConfirmed(e)
|
||||
|
||||
if (player.currentState != Player.STATE_BLOCKED)
|
||||
if (player.currentState != Player.STATE_BLOCKED) {
|
||||
onSingleTap()
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -205,13 +205,16 @@ class PopupPlayerGestureListener(
|
|||
}
|
||||
|
||||
override fun onSingleTapConfirmed(e: MotionEvent): Boolean {
|
||||
if (DEBUG)
|
||||
if (DEBUG) {
|
||||
Log.d(TAG, "onSingleTapConfirmed() called with: e = [$e]")
|
||||
}
|
||||
|
||||
if (isDoubleTapping)
|
||||
if (isDoubleTapping) {
|
||||
return true
|
||||
if (player.exoPlayerIsNull())
|
||||
}
|
||||
if (player.exoPlayerIsNull()) {
|
||||
return false
|
||||
}
|
||||
|
||||
onSingleTap()
|
||||
return true
|
||||
|
|
|
|||
|
|
@ -185,10 +185,11 @@ class MediaBrowserPlaybackPreparer(
|
|||
}
|
||||
val playlistId = path[0].toLong()
|
||||
val index = path[1].toInt()
|
||||
return if (playlistType == ID_LOCAL)
|
||||
return if (playlistType == ID_LOCAL) {
|
||||
extractLocalPlayQueue(playlistId, index)
|
||||
else
|
||||
} else {
|
||||
extractRemotePlayQueue(playlistId, index)
|
||||
}
|
||||
}
|
||||
|
||||
ID_URL -> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue