diff --git a/app/src/main/java/com/hippo/ehviewer/client/EhTagDatabase.kt b/app/src/main/java/com/hippo/ehviewer/client/EhTagDatabase.kt index 4b5f37fd2..9b7f42bbc 100644 --- a/app/src/main/java/com/hippo/ehviewer/client/EhTagDatabase.kt +++ b/app/src/main/java/com/hippo/ehviewer/client/EhTagDatabase.kt @@ -72,7 +72,7 @@ class EhTagDatabase(private val name: String, source: BufferedSource) { } fun getTranslation(prefix: String?, tag: String?): String? { - return tags!!.optJSONObject(prefix)?.optString(tag) + return tags!!.optJSONObject(prefix)?.optString(tag)?.trim()?.takeIf { it.isNotEmpty() } } /* Construct a cold flow for tag database suggestions */