|
|
|
@ -89,12 +89,14 @@ class ReadBookActivity : ReadBookBaseActivity(), |
|
|
|
|
} |
|
|
|
|
private val replaceActivity = |
|
|
|
|
registerForActivityResult(ActivityResultContracts.StartActivityForResult()) { |
|
|
|
|
it ?: return@registerForActivityResult |
|
|
|
|
if (it.resultCode == RESULT_OK) { |
|
|
|
|
viewModel.replaceRuleChanged() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
private val searchContentActivity = |
|
|
|
|
registerForActivityResult(ActivityResultContracts.StartActivityForResult()) { |
|
|
|
|
it ?: return@registerForActivityResult |
|
|
|
|
it.data?.let { data -> |
|
|
|
|
data.getIntExtra("index", ReadBook.durChapterIndex).let { index -> |
|
|
|
|
viewModel.searchContentQuery = data.getStringExtra("query") ?: "" |
|
|
|
|