From 4cfad7960ebea51b9913e35d9d87200af99e8c84 Mon Sep 17 00:00:00 2001 From: kunfei Date: Mon, 9 May 2022 23:25:34 +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 --- .../legado/app/ui/association/FileAssociationViewModel.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/association/FileAssociationViewModel.kt b/app/src/main/java/io/legado/app/ui/association/FileAssociationViewModel.kt index 65ec277ed..2f4c3fe71 100644 --- a/app/src/main/java/io/legado/app/ui/association/FileAssociationViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/association/FileAssociationViewModel.kt @@ -12,8 +12,8 @@ import io.legado.app.model.localBook.LocalBook import io.legado.app.utils.isJson import io.legado.app.utils.printOnDebug import io.legado.app.utils.readText -import java.io.File import splitties.init.appCtx +import java.io.File class FileAssociationViewModel(application: Application) : BaseAssociationViewModel(application) { val importBookLiveData = MutableLiveData() @@ -41,7 +41,10 @@ class FileAssociationViewModel(application: Application) : BaseAssociationViewMo importJson(content) } !fileName.matches(bookFileRegex) -> { - appCtx.alert(title = appCtx.getString(R.string.draw), message = appCtx.getString(R.string.file_not_supported, fileName)) { + appCtx.alert( + title = appCtx.getString(R.string.draw), + message = appCtx.getString(R.string.file_not_supported, fileName) + ) { okButton { importBookLiveData.postValue(uri) }