From 4f0ace388766148eaaea5573c70e6c010d38e7bd Mon Sep 17 00:00:00 2001 From: Horis <8674809+821938089@users.noreply.github.com> Date: Fri, 9 Jan 2026 11:34:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20#5648?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/help/source/SourceVerificationHelp.kt | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/io/legado/app/help/source/SourceVerificationHelp.kt b/app/src/main/java/io/legado/app/help/source/SourceVerificationHelp.kt index f344407a7..e2815253b 100644 --- a/app/src/main/java/io/legado/app/help/source/SourceVerificationHelp.kt +++ b/app/src/main/java/io/legado/app/help/source/SourceVerificationHelp.kt @@ -65,11 +65,13 @@ object SourceVerificationHelp { LockSupport.parkNanos(this, waitTime) } - return getResult(source.getKey())!!.let { - it.ifBlank { - throw NoStackTraceException("验证结果为空") - } + val result = getResult(source.getKey())!! + clearResult(source.getKey()) + result.ifBlank { + throw NoStackTraceException("验证结果为空") } + + return result } /** @@ -109,10 +111,7 @@ object SourceVerificationHelp { } fun getResult(sourceKey: String): String? { - val key = getVerificationResultKey(sourceKey) - val result = CacheManager.getFromMemory(key) as? String - CacheManager.deleteMemory(key) - return result + return CacheManager.getFromMemory(getVerificationResultKey(sourceKey)) as? String } fun clearResult(sourceKey: String) {