From f1ad8cb94d656b161f09dc65547c89193db28db8 Mon Sep 17 00:00:00 2001 From: kunfei Date: Mon, 9 May 2022 20:15:15 +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 --- .../io/legado/app/ui/association/BaseAssociationViewModel.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/association/BaseAssociationViewModel.kt b/app/src/main/java/io/legado/app/ui/association/BaseAssociationViewModel.kt index 19822ed18..e996bd36b 100644 --- a/app/src/main/java/io/legado/app/ui/association/BaseAssociationViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/association/BaseAssociationViewModel.kt @@ -65,11 +65,11 @@ abstract class BaseAssociationViewModel(application: Application) : BaseViewMode if (json.isJsonArray()) { GSON.fromJsonArray(json).getOrThrow()?.forEach { ThemeConfig.addConfig(it) - } ?: throw NoStackTraceException("格式不对") + } } else { GSON.fromJsonObject(json).getOrThrow()?.let { ThemeConfig.addConfig(it) - } ?: throw NoStackTraceException("格式不对") + } } }.onSuccess { finally.invoke(context.getString(R.string.success), "导入主题成功")