From 454e5395ee8d18cb478148b891ac9347633425eb Mon Sep 17 00:00:00 2001 From: kunfei Date: Tue, 7 Jan 2020 21:52:31 +0800 Subject: [PATCH] up --- .../java/io/legado/app/ui/replacerule/ReplaceRuleViewModel.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/ui/replacerule/ReplaceRuleViewModel.kt b/app/src/main/java/io/legado/app/ui/replacerule/ReplaceRuleViewModel.kt index 5c5f0e6a5..540900eec 100644 --- a/app/src/main/java/io/legado/app/ui/replacerule/ReplaceRuleViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/replacerule/ReplaceRuleViewModel.kt @@ -8,6 +8,7 @@ import io.legado.app.base.BaseViewModel import io.legado.app.data.entities.ReplaceRule import io.legado.app.help.FileHelp import io.legado.app.help.storage.Backup +import io.legado.app.help.storage.Restore import io.legado.app.utils.GSON import io.legado.app.utils.splitNotBlank import org.jetbrains.anko.toast @@ -17,7 +18,7 @@ class ReplaceRuleViewModel(application: Application) : BaseViewModel(application fun importSource(text: String, toast: (msg: String) -> Unit) { execute { - + Restore.importOldReplaceRule(text) }.onError { toast(it.localizedMessage ?: "ERROR") }.onSuccess {