pull/1296/head^2
gedoor 3 years ago
parent 58d00f331c
commit 48f2ec7ec2
  1. 5
      app/src/main/java/io/legado/app/ui/book/source/edit/BookSourceEditViewModel.kt

@ -54,7 +54,10 @@ class BookSourceEditViewModel(application: Application) : BaseViewModel(applicat
fun pasteSource(onSuccess: (source: BookSource) -> Unit) {
execute(context = Dispatchers.Main) {
context.getClipText()?.let { text ->
val text = context.getClipText()
if (text.isNullOrBlank()) {
error("剪贴板为空")
} else {
importSource(text, onSuccess)
}
}.onError {

Loading…
Cancel
Save