Store/retrieve parcelable arrays as lists instead.
This commit is contained in:
parent
76f1e588f7
commit
f9fc1cd817
6 changed files with 53 additions and 43 deletions
9
app/src/main/java/org/schabi/newpipe/ktx/Bundle.kt
Normal file
9
app/src/main/java/org/schabi/newpipe/ktx/Bundle.kt
Normal 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)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue