From c1225438a973b7d0f1824deef1ef01ea905635ef Mon Sep 17 00:00:00 2001 From: Bnyro Date: Tue, 10 Jan 2023 20:20:46 +0100 Subject: [PATCH] Use `until` instead of `..` --- .../java/com/github/libretube/ui/fragments/PlayerFragment.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/com/github/libretube/ui/fragments/PlayerFragment.kt b/app/src/main/java/com/github/libretube/ui/fragments/PlayerFragment.kt index 1be568952..2d34fe4f2 100644 --- a/app/src/main/java/com/github/libretube/ui/fragments/PlayerFragment.kt +++ b/app/src/main/java/com/github/libretube/ui/fragments/PlayerFragment.kt @@ -28,7 +28,6 @@ import androidx.annotation.RequiresApi import androidx.constraintlayout.motion.widget.MotionLayout import androidx.core.net.toUri import androidx.core.os.bundleOf -import androidx.core.os.postDelayed import androidx.core.view.isVisible import androidx.fragment.app.activityViewModels import androidx.lifecycle.Lifecycle @@ -1207,7 +1206,7 @@ class PlayerFragment : BaseFragment(), OnlinePlayerOptions { */ private fun getAvailableResolutions(): List { val resolutions = exoPlayer.currentTracks.groups.map { group -> - (0..group.length - 1).map { + (0 until group.length).map { group.getTrackFormat(it).width } }.flatten()