pull/517/head
gedoor 4 years ago
parent 924d44f737
commit 6cbb9586af
  1. 7
      app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceViewModel.kt

@ -10,10 +10,7 @@ import io.legado.app.BuildConfig
import io.legado.app.base.BaseViewModel import io.legado.app.base.BaseViewModel
import io.legado.app.constant.AppPattern import io.legado.app.constant.AppPattern
import io.legado.app.data.entities.BookSource import io.legado.app.data.entities.BookSource
import io.legado.app.utils.FileUtils import io.legado.app.utils.*
import io.legado.app.utils.GSON
import io.legado.app.utils.splitNotBlank
import io.legado.app.utils.writeText
import org.jetbrains.anko.longToast import org.jetbrains.anko.longToast
import java.io.File import java.io.File
@ -183,6 +180,8 @@ class BookSourceViewModel(application: Application) : BaseViewModel(application)
intent intent
}.onSuccess { }.onSuccess {
success.invoke(it) success.invoke(it)
}.onError {
toast(it.msg)
} }
} }

Loading…
Cancel
Save