From 127ae55ac825890c1ea7636620b27c78a5665f64 Mon Sep 17 00:00:00 2001 From: kunfei Date: Sat, 26 Feb 2022 23:41:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/legado/app/ui/book/audio/AudioPlayActivity.kt | 4 +++- app/src/main/java/io/legado/app/ui/book/toc/TocActivity.kt | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/audio/AudioPlayActivity.kt b/app/src/main/java/io/legado/app/ui/book/audio/AudioPlayActivity.kt index 17a3f4cef..84031382f 100644 --- a/app/src/main/java/io/legado/app/ui/book/audio/AudioPlayActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/audio/AudioPlayActivity.kt @@ -55,7 +55,9 @@ class AudioPlayActivity : } private val tocActivityResult = registerForActivityResult(TocActivityResult()) { it?.let { - if (it.first != AudioPlay.book?.durChapterIndex) { + if (it.first != AudioPlay.book?.durChapterIndex + || it.second == 0 + ) { AudioPlay.skipTo(this, it.first) } } diff --git a/app/src/main/java/io/legado/app/ui/book/toc/TocActivity.kt b/app/src/main/java/io/legado/app/ui/book/toc/TocActivity.kt index 1bb44501d..b91754298 100644 --- a/app/src/main/java/io/legado/app/ui/book/toc/TocActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/toc/TocActivity.kt @@ -85,7 +85,7 @@ class TocActivity : VMBaseActivity() { R.id.menu_reverse_toc -> viewModel.reverseToc { setResult(RESULT_OK, Intent().apply { putExtra("index", it.durChapterIndex) - putExtra("chapterPos", it.durChapterPos) + putExtra("chapterPos", 0) }) } R.id.menu_use_replace -> {