From 23d6a605a0dde17ecdbf308af77e1df5faf1fb58 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Mon, 12 Oct 2026 21:21:24 +0200 Subject: [PATCH] Show an empty-queue placeholder in the queue panel page When nothing is queued and the history and now-playing sections are hidden or empty, show the same placeholder as the queue sheet instead of a blank list. --- .../Views/Player/Panels/QueueListView.swift | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Yattee/Views/Player/Panels/QueueListView.swift b/Yattee/Views/Player/Panels/QueueListView.swift index b116e2ad..564ee370 100644 --- a/Yattee/Views/Player/Panels/QueueListView.swift +++ b/Yattee/Views/Player/Panels/QueueListView.swift @@ -131,7 +131,27 @@ struct QueueListView: View { private var hasMoreItems: Bool { queueManager?.hasMoreItems() ?? false } private var listStyle: VideoListStyle { appEnvironment?.settingsManager.listStyle ?? .inset } + /// Nothing to list: no queued videos, and the history and now-playing + /// sections are hidden or have nothing to show. + private var hasNoRows: Bool { + queue.isEmpty + && (!showHistory || history.isEmpty) + && (!showNowPlaying || playerState?.currentVideo == nil) + } + var body: some View { + if hasNoRows { + ContentUnavailableView( + String(localized: "queue.sheet.empty"), + systemImage: "list.bullet", + description: Text(String(localized: "queue.sheet.emptyHint")) + ) + } else { + list + } + } + + private var list: some View { ScrollViewReader { proxy in List { // History section - show previously played videos