From 5e581ee628767b093e050d427798e4773254cc49 Mon Sep 17 00:00:00 2001 From: kunfei Date: Tue, 22 Feb 2022 09:46:32 +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/utils/StringExtensions.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/utils/StringExtensions.kt b/app/src/main/java/io/legado/app/utils/StringExtensions.kt index 341c8a417..f8af7ee9a 100644 --- a/app/src/main/java/io/legado/app/utils/StringExtensions.kt +++ b/app/src/main/java/io/legado/app/utils/StringExtensions.kt @@ -57,7 +57,7 @@ fun String?.isTrue(nullIsTrue: Boolean = false): Boolean { if (this.isNullOrBlank() || this == "null") { return nullIsTrue } - return this.matches("\\s*(?i)(true|ok|yes|1)\\s*".toRegex()) + return !this.matches("\\s*(?i)(false|no|not|0)\\s*".toRegex()) } fun String.splitNotBlank(vararg delimiter: String): Array = run {