mirror of
https://github.com/gedoor/legado.git
synced 2024-09-01 09:34:25 +08:00
优化
This commit is contained in:
parent
cd3f352c92
commit
53d51c8123
@ -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") ?: ""
|
||||
|
Loading…
Reference in New Issue
Block a user