Remove useless method

This commit is contained in:
Florian Renaud 2022-11-04 18:28:26 +01:00
parent 37c75354be
commit b87b2cbb63
1 changed files with 4 additions and 8 deletions

View File

@ -166,8 +166,8 @@ class VoiceBroadcastPlayerImpl @Inject constructor(
}
}
State.BUFFERING -> {
val newMediaContent = getNextAudioContent()
if (newMediaContent != null) {
val nextItem = playlist.getNextItem()
if (nextItem != null) {
val savedPosition = currentVoiceBroadcast?.let { playbackTracker.getPlaybackTime(it.voiceBroadcastId) }
startPlayback(savedPosition)
}
@ -222,14 +222,10 @@ class VoiceBroadcastPlayerImpl @Inject constructor(
}
}
private fun getNextAudioContent(): MessageAudioContent? {
return playlist.getNextItem()?.audioEvent?.content
}
private fun prepareNextMediaPlayer() {
nextMediaPlayer = null
val nextContent = getNextAudioContent()
if (nextContent != null) {
val nextItem = playlist.getNextItem()
if (nextItem != null) {
sessionScope.launch {
prepareMediaPlayer(nextContent) { mp ->
if (nextMediaPlayer == null) {