From 9b06f83b484ac49edaf15eac976d031767349def Mon Sep 17 00:00:00 2001 From: Isira Seneviratne Date: Fri, 17 Mar 2023 09:09:36 +0530 Subject: [PATCH] Convert updateParameters() to an inline function. --- .../com/github/libretube/extensions/UpdateParameters.kt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/github/libretube/extensions/UpdateParameters.kt b/app/src/main/java/com/github/libretube/extensions/UpdateParameters.kt index 6ce00846dd..23d93231b5 100644 --- a/app/src/main/java/com/github/libretube/extensions/UpdateParameters.kt +++ b/app/src/main/java/com/github/libretube/extensions/UpdateParameters.kt @@ -2,9 +2,6 @@ package com.github.libretube.extensions import com.google.android.exoplayer2.trackselection.DefaultTrackSelector -fun DefaultTrackSelector.updateParameters( +inline fun DefaultTrackSelector.updateParameters( actions: DefaultTrackSelector.Parameters.Builder.() -> Unit -) = apply { - val params = buildUponParameters().apply(actions) - setParameters(params) -} +) = setParameters(buildUponParameters().apply(actions))