Răsfoiți Sursa

删除多余的缓存

Antecer 2 ani în urmă
părinte
comite
2a916d1628
1 a modificat fișierele cu 1 adăugiri și 9 ștergeri
  1. 1 9
      app/src/main/java/io/legado/app/help/JsExtensions.kt

+ 1 - 9
app/src/main/java/io/legado/app/help/JsExtensions.kt

@@ -768,15 +768,7 @@ 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() -> {
-                    var x = CacheManager.getByteArray(key)
-                    if (x == null) {
-                        x = AnalyzeUrl(str, source = getSource()).getByteArray()
-                        CacheManager.put(key, x)
-                    }
-                    x
-                }
-
+                str.isAbsUrl() -> AnalyzeUrl(str, source = getSource()).getByteArray()
                 str.isContentScheme() -> Uri.parse(str).readBytes(appCtx)
                 str.isContentScheme() -> Uri.parse(str).readBytes(appCtx)
                 str.startsWith("/storage") -> File(str).readBytes()
                 str.startsWith("/storage") -> File(str).readBytes()
                 else -> base64DecodeToByteArray(str)
                 else -> base64DecodeToByteArray(str)