mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
fix: NPE caused by sparseParcelableArray
This commit is contained in:
parent
da4335d885
commit
6513d43f6e
2 changed files with 9 additions and 1 deletions
|
@ -33,6 +33,7 @@
|
|||
- Fixed extension repo list did not update when a repo is added via deep link
|
||||
- Fixed download unread trying to download filtered (by scanlator) chapters
|
||||
- Fixed extensions not retaining their repo url
|
||||
- Fixed more NullPointerException crashes
|
||||
|
||||
## Other
|
||||
- Migrate some StorIO queries to SQLDelight, should improve stability
|
||||
|
|
|
@ -24,4 +24,11 @@ fun <T : Parcelable?> Intent.getSparseParcelableArrayCompat(name: String, clazz:
|
|||
|
||||
@Suppress("DEPRECATION")
|
||||
fun <T : Parcelable?> Bundle.getSparseParcelableArrayCompat(name: String, clazz: Class<T>) =
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) getSparseParcelableArray(name, clazz) else getSparseParcelableArray<T>(name)
|
||||
try {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) getSparseParcelableArray(
|
||||
name,
|
||||
clazz
|
||||
) else getSparseParcelableArray<T>(name)
|
||||
} catch (npe: NullPointerException) {
|
||||
null
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue