From 1adb9b08d7c6f80b59fb67c67182ed95a992030f Mon Sep 17 00:00:00 2001 From: Niels van Velzen Date: Sat, 21 Dec 2024 19:47:58 +0100 Subject: [PATCH] Use private entry index in QueueService --- playback/core/src/main/kotlin/queue/QueueService.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/playback/core/src/main/kotlin/queue/QueueService.kt b/playback/core/src/main/kotlin/queue/QueueService.kt index 192bc24f6a..e6b9e067cd 100644 --- a/playback/core/src/main/kotlin/queue/QueueService.kt +++ b/playback/core/src/main/kotlin/queue/QueueService.kt @@ -113,14 +113,14 @@ class QueueService internal constructor() : PlayerService(), Queue { val repeatMode = if (useRepeatMode) state.repeatMode.value else RepeatMode.NONE return when (repeatMode) { - RepeatMode.NONE -> provider.provideIndices(amount, estimatedSize, currentQueueIndicesPlayed, entryIndex.value) + RepeatMode.NONE -> provider.provideIndices(amount, estimatedSize, currentQueueIndicesPlayed, _entryIndex.value) RepeatMode.REPEAT_ENTRY_ONCE -> buildList(amount) { - add(entryIndex.value) - addAll(provider.provideIndices(amount - 1, estimatedSize, currentQueueIndicesPlayed, entryIndex.value)) + add(_entryIndex.value) + addAll(provider.provideIndices(amount - 1, estimatedSize, currentQueueIndicesPlayed, _entryIndex.value)) }.take(amount) - RepeatMode.REPEAT_ENTRY_INFINITE -> List(amount) { entryIndex.value } + RepeatMode.REPEAT_ENTRY_INFINITE -> List(amount) { _entryIndex.value } } }