优化
This commit is contained in:
@@ -55,7 +55,9 @@ class AudioPlayActivity :
|
|||||||
}
|
}
|
||||||
private val tocActivityResult = registerForActivityResult(TocActivityResult()) {
|
private val tocActivityResult = registerForActivityResult(TocActivityResult()) {
|
||||||
it?.let {
|
it?.let {
|
||||||
if (it.first != AudioPlay.book?.durChapterIndex) {
|
if (it.first != AudioPlay.book?.durChapterIndex
|
||||||
|
|| it.second == 0
|
||||||
|
) {
|
||||||
AudioPlay.skipTo(this, it.first)
|
AudioPlay.skipTo(this, it.first)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ class TocActivity : VMBaseActivity<ActivityChapterListBinding, TocViewModel>() {
|
|||||||
R.id.menu_reverse_toc -> viewModel.reverseToc {
|
R.id.menu_reverse_toc -> viewModel.reverseToc {
|
||||||
setResult(RESULT_OK, Intent().apply {
|
setResult(RESULT_OK, Intent().apply {
|
||||||
putExtra("index", it.durChapterIndex)
|
putExtra("index", it.durChapterIndex)
|
||||||
putExtra("chapterPos", it.durChapterPos)
|
putExtra("chapterPos", 0)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
R.id.menu_use_replace -> {
|
R.id.menu_use_replace -> {
|
||||||
|
|||||||
Reference in New Issue
Block a user