pull/46/head
kunfei 5 years ago
parent 6fd5fe26ca
commit 8d7e8e45bc
  1. 1
      app/src/main/java/io/legado/app/constant/Bus.kt
  2. 4
      app/src/main/java/io/legado/app/ui/audio/AudioPlayActivity.kt

@ -16,4 +16,5 @@ object Bus {
const val AUDIO_NEXT = "audioNext" const val AUDIO_NEXT = "audioNext"
const val AUDIO_CUR_POS = "audioCurPos" const val AUDIO_CUR_POS = "audioCurPos"
const val AUDIO_STATE = "audioState" const val AUDIO_STATE = "audioState"
const val AUDIO_PROGRESS = "audioProgress"
} }

@ -82,5 +82,9 @@ class AudioPlayActivity : VMBaseActivity<AudioPlayViewModel>(R.layout.activity_a
observeEvent<Int>(Bus.AUDIO_STATE) { observeEvent<Int>(Bus.AUDIO_STATE) {
status = it status = it
} }
observeEvent<Int>(Bus.AUDIO_PROGRESS) {
if (!player_progress.isInTouchMode)
player_progress.progress = it
}
} }
} }
Loading…
Cancel
Save