|
|
@ -28,8 +28,9 @@ class OnLineImportActivity : |
|
|
|
) |
|
|
|
) |
|
|
|
"rssSource" -> ImportRssSourceDialog |
|
|
|
"rssSource" -> ImportRssSourceDialog |
|
|
|
.start(supportFragmentManager, it.second, true) |
|
|
|
.start(supportFragmentManager, it.second, true) |
|
|
|
"replaceRule" -> ImportReplaceRuleDialog |
|
|
|
"replaceRule" -> supportFragmentManager.showDialog( |
|
|
|
.start(supportFragmentManager, it.second, true) |
|
|
|
ImportReplaceRuleDialog(it.second, true) |
|
|
|
|
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
viewModel.errorLive.observe(this) { |
|
|
|
viewModel.errorLive.observe(this) { |
|
|
@ -46,7 +47,9 @@ class OnLineImportActivity : |
|
|
|
ImportBookSourceDialog(url, true) |
|
|
|
ImportBookSourceDialog(url, true) |
|
|
|
) |
|
|
|
) |
|
|
|
"/rssSource" -> ImportRssSourceDialog.start(supportFragmentManager, url, true) |
|
|
|
"/rssSource" -> ImportRssSourceDialog.start(supportFragmentManager, url, true) |
|
|
|
"/replaceRule" -> ImportReplaceRuleDialog.start(supportFragmentManager, url, true) |
|
|
|
"/replaceRule" -> supportFragmentManager.showDialog( |
|
|
|
|
|
|
|
ImportReplaceRuleDialog(url, true) |
|
|
|
|
|
|
|
) |
|
|
|
"/textTocRule" -> viewModel.getText(url) { json -> |
|
|
|
"/textTocRule" -> viewModel.getText(url) { json -> |
|
|
|
viewModel.importTextTocRule(json, this::finallyDialog) |
|
|
|
viewModel.importTextTocRule(json, this::finallyDialog) |
|
|
|
} |
|
|
|
} |
|
|
@ -64,7 +67,9 @@ class OnLineImportActivity : |
|
|
|
ImportBookSourceDialog(url, true) |
|
|
|
ImportBookSourceDialog(url, true) |
|
|
|
) |
|
|
|
) |
|
|
|
"rsssource" -> ImportRssSourceDialog.start(supportFragmentManager, url, true) |
|
|
|
"rsssource" -> ImportRssSourceDialog.start(supportFragmentManager, url, true) |
|
|
|
"replace" -> ImportReplaceRuleDialog.start(supportFragmentManager, url, true) |
|
|
|
"replace" -> supportFragmentManager.showDialog( |
|
|
|
|
|
|
|
ImportReplaceRuleDialog(url, true) |
|
|
|
|
|
|
|
) |
|
|
|
else -> { |
|
|
|
else -> { |
|
|
|
toastOnUi("url error") |
|
|
|
toastOnUi("url error") |
|
|
|
finish() |
|
|
|
finish() |
|
|
|