Handle potentially missing sources list in extensions JSON
Can happen in: - Unofficial repos - If the inspector breaks (cherry picked from commit b701821550dabadd1fb061d1a68741ec91b8774d)
This commit is contained in:
parent
6cb0342929
commit
d4e3b463a3
@ -99,7 +99,7 @@ internal class ExtensionGithubApi {
|
||||
versionCode = it.code,
|
||||
lang = it.lang,
|
||||
isNsfw = it.nsfw == 1,
|
||||
sources = it.sources.toExtensionSources(),
|
||||
sources = it.sources?.toExtensionSources() ?: emptyList(),
|
||||
apkName = it.apk,
|
||||
iconUrl = "${/* SY --> */ repoUrl /* SY <-- */}icon/${it.apk.replace(".apk", ".png")}",
|
||||
// SY -->
|
||||
@ -144,7 +144,7 @@ private data class ExtensionJsonObject(
|
||||
val code: Long,
|
||||
val version: String,
|
||||
val nsfw: Int,
|
||||
val sources: List<ExtensionSourceJsonObject>,
|
||||
val sources: List<ExtensionSourceJsonObject>?,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
|
Loading…
x
Reference in New Issue
Block a user