优化
This commit is contained in:
@@ -161,7 +161,7 @@ abstract class RecyclerAdapter<ITEM, VB : ViewBinding>(protected val context: Co
|
|||||||
onCurrentListChanged()
|
onCurrentListChanged()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
handler.postDelayed(1000) {
|
handler.postDelayed(500) {
|
||||||
if (diffJob?.isCompleted == false) {
|
if (diffJob?.isCompleted == false) {
|
||||||
diffJob?.cancel()
|
diffJob?.cancel()
|
||||||
setItems(items)
|
setItems(items)
|
||||||
|
|||||||
@@ -727,15 +727,13 @@ interface JsExtensions : JsEncodeUtils {
|
|||||||
var qTTF = CacheManager.getQueryTTF(key)
|
var qTTF = CacheManager.getQueryTTF(key)
|
||||||
if (qTTF != null) return qTTF
|
if (qTTF != null) return qTTF
|
||||||
val font: ByteArray? = when {
|
val font: ByteArray? = when {
|
||||||
str.isAbsUrl() -> runBlocking {
|
str.isAbsUrl() -> {
|
||||||
var x = CacheManager.getByteArray(key)
|
var x = CacheManager.getByteArray(key)
|
||||||
if (x == null) {
|
if (x == null) {
|
||||||
x = AnalyzeUrl(str, source = getSource()).getByteArray()
|
x = AnalyzeUrl(str, source = getSource()).getByteArray()
|
||||||
x.let {
|
CacheManager.put(key, x)
|
||||||
CacheManager.put(key, it)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return@runBlocking x
|
x
|
||||||
}
|
}
|
||||||
|
|
||||||
str.isContentScheme() -> Uri.parse(str).readBytes(appCtx)
|
str.isContentScheme() -> Uri.parse(str).readBytes(appCtx)
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ val okHttpClient: OkHttpClient by lazy {
|
|||||||
})
|
})
|
||||||
.addNetworkInterceptor { chain ->
|
.addNetworkInterceptor { chain ->
|
||||||
var request = chain.request()
|
var request = chain.request()
|
||||||
val enableCookieJar = request.header(cookieJarHeader) != null
|
val enableCookieJar = request.header(cookieJarHeader) != null
|
||||||
|
|
||||||
if (enableCookieJar) {
|
if (enableCookieJar) {
|
||||||
val requestBuilder = request.newBuilder()
|
val requestBuilder = request.newBuilder()
|
||||||
|
|||||||
Reference in New Issue
Block a user