mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-25 10:55:55 +03:00
Remove debounce on player buttons
This commit is contained in:
parent
403fd9260e
commit
b85fcf9a00
1 changed files with 4 additions and 4 deletions
|
@ -60,7 +60,7 @@ abstract class MessageVoiceBroadcastListeningItem : AbsMessageVoiceBroadcastItem
|
|||
|
||||
private fun bindButtons(holder: Holder) {
|
||||
with(holder) {
|
||||
playPauseButton.onClick {
|
||||
playPauseButton.setOnClickListener {
|
||||
if (player.currentVoiceBroadcast == voiceBroadcast) {
|
||||
when (player.playingState) {
|
||||
VoiceBroadcastPlayer.State.PLAYING -> callback?.onTimelineItemAction(VoiceBroadcastAction.Listening.Pause)
|
||||
|
@ -72,11 +72,11 @@ abstract class MessageVoiceBroadcastListeningItem : AbsMessageVoiceBroadcastItem
|
|||
callback?.onTimelineItemAction(VoiceBroadcastAction.Listening.PlayOrResume(voiceBroadcast))
|
||||
}
|
||||
}
|
||||
fastBackwardButton.onClick {
|
||||
fastBackwardButton.setOnClickListener {
|
||||
val newPos = seekBar.progress.minus(30_000).coerceIn(0, duration)
|
||||
callback?.onTimelineItemAction(VoiceBroadcastAction.Listening.SeekTo(voiceBroadcast, newPos, duration))
|
||||
}
|
||||
fastForwardButton.onClick {
|
||||
fastForwardButton.setOnClickListener {
|
||||
val newPos = seekBar.progress.plus(30_000).coerceIn(0, duration)
|
||||
callback?.onTimelineItemAction(VoiceBroadcastAction.Listening.SeekTo(voiceBroadcast, newPos, duration))
|
||||
}
|
||||
|
@ -163,7 +163,7 @@ abstract class MessageVoiceBroadcastListeningItem : AbsMessageVoiceBroadcastItem
|
|||
player.removeListener(voiceBroadcast, playerListener)
|
||||
playbackTracker.untrack(voiceBroadcast.voiceBroadcastId)
|
||||
with(holder) {
|
||||
seekBar.onClick(null)
|
||||
seekBar.setOnSeekBarChangeListener(null)
|
||||
playPauseButton.onClick(null)
|
||||
fastForwardButton.onClick(null)
|
||||
fastBackwardButton.onClick(null)
|
||||
|
|
Loading…
Reference in a new issue