修复简繁转换没有转换标题

pull/440/head
gedoor 4 years ago
parent 7b80ec9380
commit f7c0f98214
  1. 20
      app/src/main/java/io/legado/app/help/BookHelp.kt

@ -355,16 +355,6 @@ object BookHelp {
}
}
}
try {
when (AppConfig.chineseConverterType) {
1 -> c = HanLP.convertToSimplifiedChinese(c)
2 -> c = HanLP.convertToTraditionalChinese(c)
}
} catch (e: Exception) {
withContext(Main) {
App.INSTANCE.toast("简繁转换出错")
}
}
val contents = arrayListOf<String>()
c.split("\n").forEach {
val str = it.replace("^[\\n\\s\\r]+".toRegex(), "")
@ -377,6 +367,16 @@ object BookHelp {
contents.add("${ReadBookConfig.paragraphIndent}$str")
}
}
try {
when (AppConfig.chineseConverterType) {
1 -> c = HanLP.convertToSimplifiedChinese(c)
2 -> c = HanLP.convertToTraditionalChinese(c)
}
} catch (e: Exception) {
withContext(Main) {
App.INSTANCE.toast("简繁转换出错")
}
}
return contents
}
}
Loading…
Cancel
Save