Remove item listeners

This commit is contained in:
Florian Renaud 2022-11-07 11:42:04 +01:00
parent 1c40f9c5e8
commit 226e2026a1
1 changed files with 6 additions and 1 deletions

View File

@ -140,8 +140,13 @@ abstract class MessageVoiceBroadcastListeningItem : AbsMessageVoiceBroadcastItem
override fun unbind(holder: Holder) {
super.unbind(holder)
player.removeListener(voiceBroadcast, playerListener)
holder.seekBar.setOnSeekBarChangeListener(null)
playbackTracker.untrack(voiceBroadcast.voiceBroadcastId)
with(holder) {
seekBar.onClick(null)
playPauseButton.onClick(null)
fastForwardButton.onClick(null)
fastBackwardButton.onClick(null)
}
}
override fun getViewStubId() = STUB_ID