移除io.legado.app.model.localBook.EpubFile 中getContent 方法中的无用查询数据库的代码。

pull/913/head
ag2s20150909 4 years ago
parent 6e1a8f6568
commit 6f660bf861
  1. 7
      app/src/main/java/io/legado/app/model/localBook/EpubFile.kt

@ -4,8 +4,6 @@ import android.graphics.Bitmap
import android.graphics.BitmapFactory import android.graphics.BitmapFactory
import android.net.Uri import android.net.Uri
import android.text.TextUtils import android.text.TextUtils
import android.util.Log
import io.legado.app.data.appDb
import io.legado.app.data.entities.Book import io.legado.app.data.entities.Book
import io.legado.app.data.entities.BookChapter import io.legado.app.data.entities.BookChapter
import io.legado.app.utils.* import io.legado.app.utils.*
@ -132,10 +130,7 @@ class EpubFile(var book: Book) {
private fun getContent(chapter: BookChapter): String? { private fun getContent(chapter: BookChapter): String? {
/*获取当前章节文本*/ /*获取当前章节文本*/
var string = getChildChapter(chapter, chapter.url) var string = getChildChapter(chapter, chapter.url)
val childContends = appDb.epubChapterDao.get(book.bookUrl, chapter.url)
childContends.forEach {
string += "\n" + getChildChapter(chapter, it.href)
}
return string return string
} }

Loading…
Cancel
Save