From 8d7e8e45bc1accf468179d0fa27ff32a2eef2e40 Mon Sep 17 00:00:00 2001 From: kunfei Date: Mon, 4 Nov 2019 10:06:44 +0800 Subject: [PATCH] up --- app/src/main/java/io/legado/app/constant/Bus.kt | 1 + app/src/main/java/io/legado/app/ui/audio/AudioPlayActivity.kt | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/app/src/main/java/io/legado/app/constant/Bus.kt b/app/src/main/java/io/legado/app/constant/Bus.kt index 115b49f92..da4f24798 100644 --- a/app/src/main/java/io/legado/app/constant/Bus.kt +++ b/app/src/main/java/io/legado/app/constant/Bus.kt @@ -16,4 +16,5 @@ object Bus { const val AUDIO_NEXT = "audioNext" const val AUDIO_CUR_POS = "audioCurPos" const val AUDIO_STATE = "audioState" + const val AUDIO_PROGRESS = "audioProgress" } \ No newline at end of file diff --git a/app/src/main/java/io/legado/app/ui/audio/AudioPlayActivity.kt b/app/src/main/java/io/legado/app/ui/audio/AudioPlayActivity.kt index cc31b3890..910b5f364 100644 --- a/app/src/main/java/io/legado/app/ui/audio/AudioPlayActivity.kt +++ b/app/src/main/java/io/legado/app/ui/audio/AudioPlayActivity.kt @@ -82,5 +82,9 @@ class AudioPlayActivity : VMBaseActivity(R.layout.activity_a observeEvent(Bus.AUDIO_STATE) { status = it } + observeEvent(Bus.AUDIO_PROGRESS) { + if (!player_progress.isInTouchMode) + player_progress.progress = it + } } } \ No newline at end of file