mirror of
https://github.com/gedoor/legado.git
synced 2024-09-01 09:34:25 +08:00
优化
This commit is contained in:
parent
db1a361392
commit
1a40324224
@ -177,7 +177,7 @@ dependencies {
|
||||
implementation('io.github.jeremyliao:live-event-bus-x:1.8.0')
|
||||
|
||||
//规则相关
|
||||
implementation('org.jsoup:jsoup:1.14.1')
|
||||
implementation('org.jsoup:jsoup:1.14.3')
|
||||
implementation('com.jayway.jsonpath:json-path:2.6.0')
|
||||
implementation('cn.wanghaomiao:JsoupXpath:2.5.0')
|
||||
implementation(project(path: ':epublib'))
|
||||
|
@ -293,7 +293,7 @@ fun Context.openUrl(uri: Uri) {
|
||||
}
|
||||
}
|
||||
|
||||
fun Context.openFileUri(uri: Uri, type: String?) {
|
||||
fun Context.openFileUri(uri: Uri, type: String? = null) {
|
||||
val intent = Intent()
|
||||
intent.action = Intent.ACTION_VIEW
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
@ -301,7 +301,7 @@ fun Context.openFileUri(uri: Uri, type: String?) {
|
||||
//7.0版本以上
|
||||
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
|
||||
}
|
||||
intent.setDataAndType(uri, type)
|
||||
intent.setDataAndType(uri, type ?: IntentType.from(uri))
|
||||
try {
|
||||
startActivity(intent)
|
||||
} catch (e: Exception) {
|
||||
|
Loading…
Reference in New Issue
Block a user