diff --git a/app/src/main/java/io/legado/app/help/BookHelp.kt b/app/src/main/java/io/legado/app/help/BookHelp.kt index 9c30ae846..956b3f46b 100644 --- a/app/src/main/java/io/legado/app/help/BookHelp.kt +++ b/app/src/main/java/io/legado/app/help/BookHelp.kt @@ -231,9 +231,15 @@ object BookHelp { if (!c.substringBefore("\n").contains(title)) { c = "$title\n$c" } - when (AppConfig.chineseConverterType) { - 1 -> c = ZhConvertBootstrap.newInstance().toSimple(c) - 2 -> c = ZhConvertBootstrap.newInstance().toTraditional(c) + try { + when (AppConfig.chineseConverterType) { + 1 -> c = ZhConvertBootstrap.newInstance().toSimple(c) + 2 -> c = ZhConvertBootstrap.newInstance().toTraditional(c) + } + } catch (e: Exception) { + withContext(Main) { + App.INSTANCE.toast("简繁转换出错") + } } return c .replace("\\s*\\n+\\s*".toRegex(), "\n${ReadBookConfig.bodyIndent}")