Store/retrieve parcelable arrays as lists instead.

This commit is contained in:
Isira Seneviratne 2023-10-31 16:36:13 -04:00 committed by Stypox
parent b749eb52e9
commit 4f53b3015b
6 changed files with 53 additions and 43 deletions

View file

@ -0,0 +1,9 @@
package org.schabi.newpipe.ktx
import android.os.Bundle
import android.os.Parcelable
import androidx.core.os.BundleCompat
inline fun <reified T : Parcelable> Bundle.parcelableArrayList(key: String?): ArrayList<T>? {
return BundleCompat.getParcelableArrayList(this, key, T::class.java)
}