From 9145722b08b9c648e41d6b36f83bebbd106efc1e Mon Sep 17 00:00:00 2001 From: jacqueline Date: Wed, 28 Aug 2024 13:01:31 +1000 Subject: [PATCH] Don't show n+1/n when we run out of queue --- src/tangara/ui/ui_fsm.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tangara/ui/ui_fsm.cpp b/src/tangara/ui/ui_fsm.cpp index 7da07215..a20eb0ef 100644 --- a/src/tangara/ui/ui_fsm.cpp +++ b/src/tangara/ui/ui_fsm.cpp @@ -436,6 +436,9 @@ void UiState::react(const audio::QueueUpdate& update) { if (queue_size > 0) { current_pos++; } + if (current_pos > queue_size) { + current_pos = queue_size; + } sQueuePosition.setDirect(current_pos); sQueueRandom.setDirect(queue.random()); sQueueRepeat.setDirect(queue.repeat());