From 45da0880baa4b2772400b0290c3fcb6026a6a58e Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Mon, 13 Nov 2023 15:22:21 -0500 Subject: [PATCH] Focus current item on queue open --- playlet-lib/src/components/PlayQueue/PlayQueueView.xml | 1 + .../src/components/PlayQueue/PlayQueueViewUtils.bs | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/playlet-lib/src/components/PlayQueue/PlayQueueView.xml b/playlet-lib/src/components/PlayQueue/PlayQueueView.xml index 6a4cd9ce..4be460d1 100644 --- a/playlet-lib/src/components/PlayQueue/PlayQueueView.xml +++ b/playlet-lib/src/components/PlayQueue/PlayQueueView.xml @@ -1,6 +1,7 @@ + diff --git a/playlet-lib/src/components/PlayQueue/PlayQueueViewUtils.bs b/playlet-lib/src/components/PlayQueue/PlayQueueViewUtils.bs index 9837edc3..84916817 100644 --- a/playlet-lib/src/components/PlayQueue/PlayQueueViewUtils.bs +++ b/playlet-lib/src/components/PlayQueue/PlayQueueViewUtils.bs @@ -7,7 +7,15 @@ namespace PlayQueueViewUtils playQueueView.appController = appController playQueueView.playQueue = playQueue appController@.PushScreen(playQueueView) - playQueueView.content = playQueue.content + + content = playQueue.content + index = playQueue.index + + playQueueView.content = content + if index > -1 and index < content.GetChildCount() + playQueueView.jumpToItem = index + end if + playQueueView@.Show(invalid) return playQueueView end function