From 3f622f522c23287680c73dc127befcf1262f9491 Mon Sep 17 00:00:00 2001 From: gedoor Date: Wed, 19 Aug 2020 17:33:26 +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/book/read/ReadBookActivity.kt | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt b/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt index 512d22a6f..c89d6ac5d 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt @@ -470,7 +470,18 @@ class ReadBookActivity : VMBaseActivity(R.layout.activity_boo override fun onMenuItemSelected(itemId: Int): Boolean { when (itemId) { R.id.menu_replace -> { - ReplaceEditDialog.show(supportFragmentManager, pattern = selectedText) + val scopes = arrayListOf() + ReadBook.book?.name?.let { + scopes.add(it) + } + ReadBook.bookSource?.bookSourceUrl?.let { + scopes.add(it) + } + ReplaceEditDialog.show( + supportFragmentManager, + pattern = selectedText, + scope = scopes.joinToString { ";" } + ) return true } }