pull/323/head
gedoor 4 years ago
parent 900aef347f
commit 3f622f522c
  1. 13
      app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt

@ -470,7 +470,18 @@ class ReadBookActivity : VMBaseActivity<ReadBookViewModel>(R.layout.activity_boo
override fun onMenuItemSelected(itemId: Int): Boolean { override fun onMenuItemSelected(itemId: Int): Boolean {
when (itemId) { when (itemId) {
R.id.menu_replace -> { R.id.menu_replace -> {
ReplaceEditDialog.show(supportFragmentManager, pattern = selectedText) val scopes = arrayListOf<String>()
ReadBook.book?.name?.let {
scopes.add(it)
}
ReadBook.bookSource?.bookSourceUrl?.let {
scopes.add(it)
}
ReplaceEditDialog.show(
supportFragmentManager,
pattern = selectedText,
scope = scopes.joinToString { ";" }
)
return true return true
} }
} }

Loading…
Cancel
Save