From 6cbb9586af6038098ee57da1392065496eed8b10 Mon Sep 17 00:00:00 2001 From: gedoor Date: Fri, 4 Dec 2020 21:15:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/ui/book/source/manage/BookSourceViewModel.kt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceViewModel.kt b/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceViewModel.kt index 0a42eb737..737ef2415 100644 --- a/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceViewModel.kt +++ b/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.constant.AppPattern import io.legado.app.data.entities.BookSource -import io.legado.app.utils.FileUtils -import io.legado.app.utils.GSON -import io.legado.app.utils.splitNotBlank -import io.legado.app.utils.writeText +import io.legado.app.utils.* import org.jetbrains.anko.longToast import java.io.File @@ -183,6 +180,8 @@ class BookSourceViewModel(application: Application) : BaseViewModel(application) intent }.onSuccess { success.invoke(it) + }.onError { + toast(it.msg) } }