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,16 +110,13 @@ class DirectLinkUploadConfig : BaseDialogFragment(R.layout.dialog_direct_link_up
|
||||
execute {
|
||||
DirectLinkUpload.upLoad("test.json", "{}", "application/json", rule)
|
||||
}.onError {
|
||||
val result = it.localizedMessage ?: "ERROR"
|
||||
alert {
|
||||
setTitle("result")
|
||||
setMessage(result)
|
||||
okButton()
|
||||
negativeButton(R.string.copy_text) {
|
||||
appCtx.sendToClip(result)
|
||||
}
|
||||
}
|
||||
alertTestResult(it.localizedMessage ?: "ERROR")
|
||||
}.onSuccess { result ->
|
||||
alertTestResult(result)
|
||||
}
|
||||
}
|
||||
|
||||
private fun alertTestResult(result: String) {
|
||||
alert {
|
||||
setTitle("result")
|
||||
setMessage(result)
|
||||
@ -129,6 +126,5 @@ class DirectLinkUploadConfig : BaseDialogFragment(R.layout.dialog_direct_link_up
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user