Merge pull request #3318 from Isira-Seneviratne/updateParameters_inline

Convert updateParameters() to an inline function.
This commit is contained in:
Bnyro 2023-03-17 07:11:56 +01:00 committed by GitHub
commit a552004df1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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))