mirror of
https://github.com/gedoor/legado.git
synced 2024-08-30 09:23:26 +08:00
优化
This commit is contained in:
parent
f03c4c740a
commit
99220cb779
@ -49,14 +49,20 @@ class OnLineImportActivity :
|
||||
finallyDialog(getString(R.string.error), it)
|
||||
}
|
||||
intent.data?.let {
|
||||
val url = it.toString().substringAfter("src=")
|
||||
val url = it.query?.substringAfter("src=")
|
||||
if (url.isNullOrBlank()) {
|
||||
finish()
|
||||
return
|
||||
}
|
||||
when (it.path) {
|
||||
"/bookSource" -> showDialogFragment(
|
||||
ImportBookSourceDialog(url, true)
|
||||
)
|
||||
|
||||
"/rssSource" -> showDialogFragment(
|
||||
ImportRssSourceDialog(url, true)
|
||||
)
|
||||
|
||||
"/replaceRule" -> showDialogFragment(
|
||||
ImportReplaceRuleDialog(url, true)
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user