mirror of
https://github.com/gedoor/legado.git
synced 2025-08-10 00:52:30 +00:00
优化
This commit is contained in:
@@ -211,7 +211,7 @@ object BookHelp {
|
||||
return if (uri.isContentScheme()) {
|
||||
appCtx.contentResolver.openFileDescriptor(uri, "r")
|
||||
} 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 {
|
||||
fileDescriptor =
|
||||
ParcelFileDescriptor.open(File(uri.path), ParcelFileDescriptor.MODE_READ_ONLY)
|
||||
ParcelFileDescriptor.open(File(uri.path!!), ParcelFileDescriptor.MODE_READ_ONLY)
|
||||
?.also {
|
||||
pdfRenderer = PdfRenderer(it)
|
||||
}
|
||||
|
||||
@@ -308,6 +308,7 @@ class ContentTextView(context: Context, attrs: AttributeSet?) : View(context, at
|
||||
* 单击
|
||||
* @return true:已处理, false:未处理
|
||||
*/
|
||||
@Suppress("UNUSED_ANONYMOUS_PARAMETER")
|
||||
fun click(x: Float, y: Float): Boolean {
|
||||
var handled = false
|
||||
touch(x, y) { _, textPos, textPage, textLine, column ->
|
||||
|
||||
Reference in New Issue
Block a user