Skip to content

Commit 05d4dd5

Browse files
committed
Fix play queue next button visibility check to use size() method
1 parent 80d0396 commit 05d4dd5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

app/src/main/java/org/schabi/newpipe/player/ui/VideoPlayerUi.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ abstract class VideoPlayerUi protected constructor(
779779
val playQueue: PlayQueue = player.playQueue ?: return
780780

781781
val showPrev = playQueue.index != 0
782-
val showNext = playQueue.index + 1 != playQueue.streams.size
782+
val showNext = playQueue.index + 1 != playQueue.size()
783783

784784
binding.playPreviousButton.visibility = if (showPrev) View.VISIBLE else View.INVISIBLE
785785
binding.playPreviousButton.alpha = if (showPrev) 1.0f else 0.0f
@@ -941,7 +941,7 @@ abstract class VideoPlayerUi protected constructor(
941941
if (!show || playQueue.index > 0) {
942942
binding.playPreviousButton.animate(show, duration, AnimationType.SCALE_AND_ALPHA)
943943
}
944-
if (!show || playQueue.index + 1 < playQueue.streams.size) {
944+
if (!show || playQueue.index + 1 < playQueue.size()) {
945945
binding.playNextButton.animate(show, duration, AnimationType.SCALE_AND_ALPHA)
946946
}
947947
}

0 commit comments

Comments
 (0)