From ea5939c1b7da2279181d195073eb9ca038ee4b44 Mon Sep 17 00:00:00 2001 From: TacoTheDank Date: Wed, 18 Nov 2020 17:45:19 -0500 Subject: [PATCH] Kotlin lint fixing --- .../main/java/org/schabi/newpipe/local/feed/FeedViewModel.kt | 3 +-- .../schabi/newpipe/player/event/BasePlayerGestureListener.kt | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/local/feed/FeedViewModel.kt b/app/src/main/java/org/schabi/newpipe/local/feed/FeedViewModel.kt index 13c3183da..0976de248 100644 --- a/app/src/main/java/org/schabi/newpipe/local/feed/FeedViewModel.kt +++ b/app/src/main/java/org/schabi/newpipe/local/feed/FeedViewModel.kt @@ -48,8 +48,7 @@ class FeedViewModel(applicationContext: Context, val groupId: Long = FeedGroupEn .throttleLatest(DEFAULT_THROTTLE_TIMEOUT, TimeUnit.MILLISECONDS) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) - .subscribe { - val (event, listFromDB, notLoadedCount, oldestUpdate) = it + .subscribe { (event, listFromDB, notLoadedCount, oldestUpdate) -> val oldestUpdateCalendar = oldestUpdate?.toCalendar() diff --git a/app/src/main/java/org/schabi/newpipe/player/event/BasePlayerGestureListener.kt b/app/src/main/java/org/schabi/newpipe/player/event/BasePlayerGestureListener.kt index 681c1b9af..5bd13a569 100644 --- a/app/src/main/java/org/schabi/newpipe/player/event/BasePlayerGestureListener.kt +++ b/app/src/main/java/org/schabi/newpipe/player/event/BasePlayerGestureListener.kt @@ -15,6 +15,7 @@ import org.schabi.newpipe.util.AnimationUtils import kotlin.math.abs import kotlin.math.hypot import kotlin.math.max +import kotlin.math.min /** * Base gesture handling for [VideoPlayerImpl] @@ -117,7 +118,7 @@ abstract class BasePlayerGestureListener( initSecPointerX = event.getX(1) initSecPointerY = event.getY(1) // record distance between fingers - initPointerDistance = Math.hypot(initFirstPointerX - initSecPointerX.toDouble(), + initPointerDistance = hypot(initFirstPointerX - initSecPointerX.toDouble(), initFirstPointerY - initSecPointerY.toDouble()) isResizing = true @@ -185,7 +186,7 @@ abstract class BasePlayerGestureListener( playerImpl.updateScreenSize() playerImpl.updatePopupSize( - Math.min(playerImpl.screenWidth.toDouble(), newWidth).toInt(), + min(playerImpl.screenWidth.toDouble(), newWidth).toInt(), -1) return true }