mirror of
https://github.com/gedoor/legado.git
synced 2025-08-10 00:52:30 +00:00
优化
Some checks failed
Test Build / prepare (push) Has been cancelled
Test Build / build (app, release) (push) Has been cancelled
Test Build / build (app, releaseA) (push) Has been cancelled
Test Build / prerelease (push) Has been cancelled
Test Build / lanzou (push) Has been cancelled
Test Build / test_Branch (push) Has been cancelled
Test Build / telegram (push) Has been cancelled
Some checks failed
Test Build / prepare (push) Has been cancelled
Test Build / build (app, release) (push) Has been cancelled
Test Build / build (app, releaseA) (push) Has been cancelled
Test Build / prerelease (push) Has been cancelled
Test Build / lanzou (push) Has been cancelled
Test Build / test_Branch (push) Has been cancelled
Test Build / telegram (push) Has been cancelled
This commit is contained in:
@@ -116,7 +116,7 @@ interface BaseSource : JsExtensions {
|
||||
putAll(map)
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
AppLog.put("getHeaderMap 出错\n$e", e)
|
||||
AppLog.put("执行请求头规则出错\n$e", e)
|
||||
}
|
||||
}
|
||||
if (!has(AppConst.UA_NAME, true)) {
|
||||
|
||||
@@ -191,9 +191,9 @@ abstract class PageDelegate(protected val readView: ReadView) {
|
||||
}
|
||||
|
||||
fun postInvalidate() {
|
||||
if (isRunning && this is HorizontalPageDelegate) {
|
||||
if (isStarted && isRunning && this is HorizontalPageDelegate) {
|
||||
readView.post {
|
||||
if (isRunning) {
|
||||
if (isStarted && isRunning) {
|
||||
setBitmap()
|
||||
readView.invalidate()
|
||||
}
|
||||
|
||||
@@ -68,7 +68,9 @@ inline fun <reified T> Gson.fromJsonArray(json: String?): Result<List<T>> {
|
||||
val type = TypeToken.getParameterized(List::class.java, T::class.java).type
|
||||
val list = fromJson(json, type) as List<T?>
|
||||
if (list.contains(null)) {
|
||||
throw JsonSyntaxException("存在null")
|
||||
throw JsonSyntaxException(
|
||||
"列表不能存在null元素,可能是json格式错误,通常为列表存在多余的逗号所致"
|
||||
)
|
||||
}
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
list as List<T>
|
||||
@@ -94,7 +96,9 @@ inline fun <reified T> Gson.fromJsonArray(inputStream: InputStream?): Result<Lis
|
||||
val type = TypeToken.getParameterized(List::class.java, T::class.java).type
|
||||
val list = fromJson(reader, type) as List<T?>
|
||||
if (list.contains(null)) {
|
||||
throw JsonSyntaxException("存在null")
|
||||
throw JsonSyntaxException(
|
||||
"列表不能存在null元素,可能是json格式错误,通常为列表存在多余的逗号所致"
|
||||
)
|
||||
}
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
list as List<T>
|
||||
|
||||
Reference in New Issue
Block a user