|
|
@ -51,18 +51,10 @@ class ImportRssSourceActivity : |
|
|
|
viewModel.importSource(it) |
|
|
|
viewModel.importSource(it) |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
intent.getStringExtra("filePath")?.let { |
|
|
|
|
|
|
|
viewModel.importSourceFromFilePath(it) |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
intent.data?.let { |
|
|
|
intent.data?.let { |
|
|
|
when (it.path) { |
|
|
|
when (it.path) { |
|
|
|
"/importonline" -> it.getQueryParameter("src")?.let { url -> |
|
|
|
"/importonline" -> it.getQueryParameter("src")?.let { url -> |
|
|
|
if (url.startsWith("http", false)) { |
|
|
|
|
|
|
|
viewModel.importSource(url) |
|
|
|
viewModel.importSource(url) |
|
|
|
} else { |
|
|
|
|
|
|
|
viewModel.importSourceFromFilePath(url) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
else -> { |
|
|
|
else -> { |
|
|
|
binding.rotateLoading.hide() |
|
|
|
binding.rotateLoading.hide() |
|
|
|