mirror of
https://github.com/element-hq/element-android
synced 2024-11-27 03:48:12 +03:00
Remove useless method
This commit is contained in:
parent
37c75354be
commit
b87b2cbb63
1 changed files with 4 additions and 8 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue