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 } }