pull/2675/head
kunfei 2 years ago
parent 82270120fd
commit 8ea40e1457
  1. 2
      app/src/main/java/io/legado/app/help/book/BookHelp.kt
  2. 2
      app/src/main/java/io/legado/app/model/localBook/PdfFile.kt
  3. 1
      app/src/main/java/io/legado/app/ui/book/read/page/ContentTextView.kt

@ -211,7 +211,7 @@ object BookHelp {
return if (uri.isContentScheme()) { return if (uri.isContentScheme()) {
appCtx.contentResolver.openFileDescriptor(uri, "r") appCtx.contentResolver.openFileDescriptor(uri, "r")
} else { } else {
ParcelFileDescriptor.open(File(uri.path), ParcelFileDescriptor.MODE_READ_ONLY) ParcelFileDescriptor.open(File(uri.path!!), ParcelFileDescriptor.MODE_READ_ONLY)
} }
} }

@ -107,7 +107,7 @@ class PdfFile(var book: Book) {
} }
} else { } else {
fileDescriptor = fileDescriptor =
ParcelFileDescriptor.open(File(uri.path), ParcelFileDescriptor.MODE_READ_ONLY) ParcelFileDescriptor.open(File(uri.path!!), ParcelFileDescriptor.MODE_READ_ONLY)
?.also { ?.also {
pdfRenderer = PdfRenderer(it) pdfRenderer = PdfRenderer(it)
} }

@ -308,6 +308,7 @@ class ContentTextView(context: Context, attrs: AttributeSet?) : View(context, at
* 单击 * 单击
* @return true:已处理, false:未处理 * @return true:已处理, false:未处理
*/ */
@Suppress("UNUSED_ANONYMOUS_PARAMETER")
fun click(x: Float, y: Float): Boolean { fun click(x: Float, y: Float): Boolean {
var handled = false var handled = false
touch(x, y) { _, textPos, textPage, textLine, column -> touch(x, y) { _, textPos, textPage, textLine, column ->

Loading…
Cancel
Save