playback: instrument the cover pager's command path
This commit is contained in:
@@ -348,6 +348,9 @@ class PlaybackPanelFragment :
|
|||||||
val binding = binding ?: return
|
val binding = binding ?: return
|
||||||
|
|
||||||
val command = playbackModel.pagerCommand.consume()
|
val command = playbackModel.pagerCommand.consume()
|
||||||
|
L.d(
|
||||||
|
"Pager: applying queue size ${queue.queue.size}, index ${queue.index}, command $command, pager at ${binding.playbackPager.currentItem}"
|
||||||
|
)
|
||||||
if (command == null) {
|
if (command == null) {
|
||||||
// This probably shouldn't happen in practice, as QueueViewModel directly
|
// This probably shouldn't happen in practice, as QueueViewModel directly
|
||||||
// attaches to PlaybackStateManager and will basically always initialize
|
// attaches to PlaybackStateManager and will basically always initialize
|
||||||
|
|||||||
@@ -138,6 +138,7 @@ constructor(
|
|||||||
|
|
||||||
override fun onIndexMoved(index: Int) {
|
override fun onIndexMoved(index: Int) {
|
||||||
L.d("Index moved, updating current song")
|
L.d("Index moved, updating current song")
|
||||||
|
L.d("Pager: command scroll to $index")
|
||||||
positionDs.value = playbackManager.progression.calculateElapsedPositionMs().msToDs()
|
positionDs.value = playbackManager.progression.calculateElapsedPositionMs().msToDs()
|
||||||
song.value = playbackManager.currentSong
|
song.value = playbackManager.currentSong
|
||||||
|
|
||||||
@@ -158,6 +159,7 @@ constructor(
|
|||||||
scroll = index.takeIf { change.type != QueueChange.Type.MAPPING },
|
scroll = index.takeIf { change.type != QueueChange.Type.MAPPING },
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
L.d("Pager: command ${change.instructions}, scroll ${index.takeIf { change.type != QueueChange.Type.MAPPING }}, queue size ${queue.size}")
|
||||||
_pagerQueue.value = PagerQueue(queue = queue, index = index)
|
_pagerQueue.value = PagerQueue(queue = queue, index = index)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user