mirror of
https://github.com/gedoor/legado.git
synced 2024-08-30 09:23:26 +08:00
优化
This commit is contained in:
parent
15c0b2a3cc
commit
761a560d0c
@ -110,23 +110,19 @@ class DirectLinkUploadConfig : BaseDialogFragment(R.layout.dialog_direct_link_up
|
|||||||
execute {
|
execute {
|
||||||
DirectLinkUpload.upLoad("test.json", "{}", "application/json", rule)
|
DirectLinkUpload.upLoad("test.json", "{}", "application/json", rule)
|
||||||
}.onError {
|
}.onError {
|
||||||
val result = it.localizedMessage ?: "ERROR"
|
alertTestResult(it.localizedMessage ?: "ERROR")
|
||||||
alert {
|
|
||||||
setTitle("result")
|
|
||||||
setMessage(result)
|
|
||||||
okButton()
|
|
||||||
negativeButton(R.string.copy_text) {
|
|
||||||
appCtx.sendToClip(result)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}.onSuccess { result ->
|
}.onSuccess { result ->
|
||||||
alert {
|
alertTestResult(result)
|
||||||
setTitle("result")
|
}
|
||||||
setMessage(result)
|
}
|
||||||
okButton()
|
|
||||||
negativeButton(R.string.copy_text) {
|
private fun alertTestResult(result: String) {
|
||||||
appCtx.sendToClip(result)
|
alert {
|
||||||
}
|
setTitle("result")
|
||||||
|
setMessage(result)
|
||||||
|
okButton()
|
||||||
|
negativeButton(R.string.copy_text) {
|
||||||
|
appCtx.sendToClip(result)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user