pull/1625/head
kunfei 3 years ago
parent cf91215410
commit e495a7fa0e
  1. 3
      app/src/main/assets/updateLog.md
  2. 14
      app/src/main/java/io/legado/app/model/localBook/TextFile.kt

@ -11,12 +11,13 @@
* 正文出现缺字漏字、内容缺失、排版错乱等情况,有可能是净化规则或简繁转换出现问题。
* 漫画源看书显示乱码,**阅读与其他软件的源并不通用**,请导入阅读的支持的漫画源!
**2022/02/13**
**2022/02/16**
* 目录正文现在按照搜索发现分别校验
* 书源校验的超时校验存在bug
* 标题支持换行
* 修复校验超时判断
* 优化txt目录识别,超长章节单独拆分,不在全文拆分
**2022/02/11**

@ -118,11 +118,14 @@ class TextFile(private val book: Book) {
}
//获取文件中的数据到buffer,直到没有数据为止
while (
fileEnd - curOffset > 0 &&
fileEnd - curOffset - bufferStart > 0 &&
bis.read(
buffer,
bufferStart,
min((bufferSize - bufferStart).toLong(), fileEnd - curOffset).toInt()
min(
(bufferSize - bufferStart).toLong(),
fileEnd - curOffset - bufferStart
).toInt()
).also { length = it } > 0
) {
var end = bufferStart + length
@ -258,11 +261,14 @@ class TextFile(private val book: Book) {
}
//获取文件中的数据到buffer,直到没有数据为止
while (
fileEnd - curOffset > 0 &&
fileEnd - curOffset - bufferStart > 0 &&
bis.read(
buffer,
bufferStart,
min((bufferSize - bufferStart).toLong(), fileEnd - curOffset).toInt()
min(
(bufferSize - bufferStart).toLong(),
fileEnd - curOffset - bufferStart
).toInt()
).also { length = it } > 0
) {
blockPos++

Loading…
Cancel
Save