Commit e0e9cb5d authored by Geoffrey Métais's avatar Geoffrey Métais

Fix time not reverse on audio player header

parent 3215e251
......@@ -244,14 +244,15 @@ class AudioPlayer : PlaybackServiceFragment(), PlaybackService.Callback, Playlis
if (mService === null) return
val time = mService.time
val length = mService.length
val timeText = Tools.millisToString((if (mShowRemainingTime) time - length else time))
mBinding.headerTime.text = Tools.millisToString(time)
mBinding.headerTime.text = timeText
mBinding.length.text = Tools.millisToString(length)
mBinding.timeline.max = length.toInt()
mBinding.progressBar.max = length.toInt()
if (!mPreviewingSeek) {
mBinding.time.text = Tools.millisToString((if (mShowRemainingTime) time - length else time))
mBinding.time.text = timeText
mBinding.timeline.progress = time.toInt()
mBinding.progressBar.progress = time.toInt()
}
......@@ -312,7 +313,6 @@ class AudioPlayer : PlaybackServiceFragment(), PlaybackService.Callback, Playlis
fun onTimeLabelClick(view: View) {
mShowRemainingTime = !mShowRemainingTime
update()
}
fun onPlayPauseClick(view: View) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment