From d8467c32917cbe95e4e05eda9259924a45c96dca Mon Sep 17 00:00:00 2001 From: gedoor Date: Sun, 22 Nov 2020 20:37:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/help/JsExtensions.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/help/JsExtensions.kt b/app/src/main/java/io/legado/app/help/JsExtensions.kt index f8d8ea87d..623eb7c9d 100644 --- a/app/src/main/java/io/legado/app/help/JsExtensions.kt +++ b/app/src/main/java/io/legado/app/help/JsExtensions.kt @@ -242,7 +242,7 @@ interface JsExtensions { } fun queryTTF(path: String): QueryTTF? { - val qTTF = CacheManager.getQueryTTF(path) + var qTTF = CacheManager.getQueryTTF(path) if (qTTF != null) { return qTTF } @@ -265,7 +265,9 @@ interface JsExtensions { } } font ?: return null - return QueryTTF(font) + qTTF = QueryTTF(font) + CacheManager.put(path, qTTF) + return qTTF } fun replaceFont(