From 3a3d0c36be41cd519141bd5174916d3bc233c7a9 Mon Sep 17 00:00:00 2001 From: bushixuanqi <57338301+bushixuanqi@users.noreply.github.com> Date: Sun, 13 Jun 2021 17:53:09 +0800 Subject: [PATCH] Update ImportBookActivity.kt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增自定义“导入文件名”选项 --- .../app/ui/book/local/ImportBookActivity.kt | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/ui/book/local/ImportBookActivity.kt b/app/src/main/java/io/legado/app/ui/book/local/ImportBookActivity.kt index 8dfa25975..724152c15 100644 --- a/app/src/main/java/io/legado/app/ui/book/local/ImportBookActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/local/ImportBookActivity.kt @@ -15,8 +15,10 @@ import io.legado.app.R import io.legado.app.base.VMBaseActivity import io.legado.app.data.appDb import io.legado.app.databinding.ActivityImportBookBinding +import io.legado.app.databinding.DialogEditTextBinding import io.legado.app.help.AppConfig import io.legado.app.lib.permission.Permissions +import io.legado.app.lib.dialogs.alert import io.legado.app.lib.permission.PermissionsCompat import io.legado.app.lib.theme.backgroundColor import io.legado.app.ui.document.FilePicker @@ -78,6 +80,7 @@ class ImportBookActivity : VMBaseActivity selectFolder.launch(null) R.id.menu_scan_folder -> scanFolder() + R.id.menu_import_file_name -> alertImportFileName() } return super.onCompatOptionsItemSelected(item) } @@ -275,6 +278,19 @@ class ImportBookActivity : VMBaseActivity Unit = { launch { adapter.addItem(it) @@ -322,4 +338,4 @@ class ImportBookActivity : VMBaseActivity