playback: instrument the cover pager's command path

This commit is contained in:
jay
2026-11-12 15:33:45 -05:00
parent 6e2a260df9
commit 642a3add27
2 changed files with 5 additions and 0 deletions
@@ -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)
} }